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 /src | |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/common/cbasetypes.h | 4 |
1 files changed, 2 insertions, 2 deletions
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_ */ |