From 9855d5724bd4bc11b2ee2e155ce827c3acb66618 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 20 Dec 2006 16:43:46 +0000 Subject: - Fixed ISSPACE and ISALPHA casting their returned value to a char. These are "bool" functions, and as such return an non-zero int as result, casting them to char just... really messes things up when the returned value is out of the CHAR_MAX/CHAR_MIN range! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9538 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 3 +++ src/common/cbasetypes.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 60791db70..85a4676df 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/12/20 + * Fixed ISSPACE and ISALPHA casting their returned value to a char, which + can really mess up the scripting engine when the returned value is true, + yet casted to false. * Moved the strip unequip code to before deleting the timer, this fixes trying to "re-strip" someone causing the skill to fail and on top of that terminate their current strip effect. diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 3ef6dfd2f..3b5c69fbe 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -289,7 +289,7 @@ typedef char bool; ////////////////////////////////////////////////////////////////////////// // Has to be unsigned to avoid problems in some systems #define TOLOWER(c) ((char)tolower((unsigned char)(c))) -#define ISSPACE(c) ((char)isspace((unsigned char)(c))) -#define ISALPHA(c) ((char)isalpha((unsigned char)(c))) +#define ISSPACE(c) (isspace((unsigned char)(c))) +#define ISALPHA(c) (isalpha((unsigned char)(c))) #endif /* _CBASETYPES_H_ */ -- cgit v1.2.3-70-g09d2