From 658080deeda79d20ea40643569fbcb072573e7cf Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 28 Jan 2012 01:15:49 +0100 Subject: 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. --- engines/sword1/animation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/sword1') diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 5ad84d995f..a1c02c861a 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -115,7 +115,7 @@ bool MoviePlayer::load(uint32 id) { int startFrame = strtoul(ptr, const_cast(&ptr), 10); int endFrame = strtoul(ptr, const_cast(&ptr), 10); - while (*ptr && isspace(static_cast(*ptr))) + while (*ptr && isSpace(*ptr)) ptr++; if (startFrame > endFrame) { @@ -132,7 +132,7 @@ bool MoviePlayer::load(uint32 id) { if (*ptr == '@') { ++ptr; color = strtoul(ptr, const_cast(&ptr), 10); - while (*ptr && isspace(static_cast(*ptr))) + while (*ptr && isSpace(*ptr)) ptr++; } -- cgit v1.2.3