summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-12-30 17:06:43 +0100
committerHaru <haru@dotalux.com>2013-12-30 17:22:48 +0100
commit671d61a7b290c5dff42a273160d9e716653db3f2 (patch)
tree1629cdfd3cb419811c2f12c92005addb0acd378c /3rdparty/libconfig
parent1591bbc4e23ec39a830dfc6bd8186d416defa691 (diff)
downloadhercules-671d61a7b290c5dff42a273160d9e716653db3f2.tar.gz
hercules-671d61a7b290c5dff42a273160d9e716653db3f2.tar.bz2
hercules-671d61a7b290c5dff42a273160d9e716653db3f2.tar.xz
hercules-671d61a7b290c5dff42a273160d9e716653db3f2.zip
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 <haru@dotalux.com>
Diffstat (limited to '3rdparty/libconfig')
-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;
}