summaryrefslogtreecommitdiff
path: root/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty')
-rw-r--r--3rdparty/libconfig/extra/gen/scanner.l2
-rw-r--r--3rdparty/libconfig/scanner.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/3rdparty/libconfig/extra/gen/scanner.l b/3rdparty/libconfig/extra/gen/scanner.l
index 66364e019..bf527e596 100644
--- a/3rdparty/libconfig/extra/gen/scanner.l
+++ b/3rdparty/libconfig/extra/gen/scanner.l
@@ -89,7 +89,7 @@ static unsigned long long fromhex(const char *s)
static int fromihex(const char *s) {
unsigned long l = strtoul(s, NULL, 16);
if (l > INT32_MAX)
- l = INT32_MAX;
+ l &= INT32_MAX;
return (int)l;
}
diff --git a/3rdparty/libconfig/scanner.c b/3rdparty/libconfig/scanner.c
index c3a717ff0..44a7d69dd 100644
--- a/3rdparty/libconfig/scanner.c
+++ b/3rdparty/libconfig/scanner.c
@@ -628,7 +628,7 @@ static unsigned long long fromhex(const char *s)
static int fromihex(const char *s) {
unsigned long l = strtoul(s, NULL, 16);
if (l > INT32_MAX)
- l = INT32_MAX;
+ l &= INT32_MAX;
return (int)l;
}