diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-12-20 16:43:46 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-12-20 16:43:46 +0000 |
commit | 9855d5724bd4bc11b2ee2e155ce827c3acb66618 (patch) | |
tree | a04ccef1a01bea3fcb1eb3d881cd538812e50433 | |
parent | db09034d6836abbd1c8988cd0d07236e3c8f2bf1 (diff) | |
download | hercules-9855d5724bd4bc11b2ee2e155ce827c3acb66618.tar.gz hercules-9855d5724bd4bc11b2ee2e155ce827c3acb66618.tar.bz2 hercules-9855d5724bd4bc11b2ee2e155ce827c3acb66618.tar.xz hercules-9855d5724bd4bc11b2ee2e155ce827c3acb66618.zip |
- 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
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | 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_ */ |