mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
ALL: Avoid using is* macros from ctype.h
On some systems, passing signed chars to macros like isspace() etc. lead to a runtime error. Hence, mark these macros as forbidden by default, and introduce otherwise equivalent alternatives for them.
This commit is contained in:
@@ -277,7 +277,7 @@ void registerDefaults() {
|
||||
// resp. between "--some-option" and "--no-some-option".
|
||||
#define DO_OPTION_BOOL(shortCmd, longCmd) \
|
||||
if (isLongCmd ? (!strcmp(s+2, longCmd) || !strcmp(s+2, "no-"longCmd)) : (tolower(s[1]) == shortCmd)) { \
|
||||
bool boolValue = (islower(static_cast<unsigned char>(s[1])) != 0); \
|
||||
bool boolValue = (isLower(s[1]) != 0); \
|
||||
s += 2; \
|
||||
if (isLongCmd) { \
|
||||
boolValue = !strcmp(s, longCmd); \
|
||||
|
||||
Reference in New Issue
Block a user