From a85a3d356a914e8826adc45818e7982ec74dd11d Mon Sep 17 00:00:00 2001 From: A_D Date: Mon, 23 Nov 2020 08:50:07 +0200 Subject: [PATCH] Added warning on windows for large ints --- config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.py b/config.py index 615aff9f..02c2b706 100644 --- a/config.py +++ b/config.py @@ -449,6 +449,8 @@ class WinConfig(AbstractConfig): winreg.SetValueEx(self.__reg_handle, key, REG_RESERVED_ALWAYS_ZERO, winreg.REG_SZ, val) elif isinstance(val, int): # The original code checked for numbers.Integral, I dont think that is needed. + if val > 0xFFFFFFFF or val < 0: + warnings.warn(f'Value of {val} is either too large or negative. This will cause issues.') reg_type = winreg.REG_DWORD elif isinstance(val, list):