From 671d61a7b290c5dff42a273160d9e716653db3f2 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 30 Dec 2013 17:06:43 +0100 Subject: Fixed an issue with items accidentally made equippable from all classes - Follow-up to 15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48 - Fixes dagger items being equippable by acolyte classes (and possibly many other issues) - Issue caused by an incorrect capping method when the Job field is set to a value greater than 0x7fffffff Signed-off-by: Haru --- 3rdparty/libconfig/extra/gen/scanner.l | 2 +- 3rdparty/libconfig/scanner.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to '3rdparty') 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; } -- cgit v1.2.3-60-g2f50