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. --- graphics/font.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graphics') diff --git a/graphics/font.cpp b/graphics/font.cpp index 8775bccc7b..7b48fe9999 100644 --- a/graphics/font.cpp +++ b/graphics/font.cpp @@ -184,7 +184,7 @@ int Font::wordWrapText(const Common::String &str, int maxWidth, Common::Array 0) { wrapper.add(line, lineWidth); // Trim left side - while (tmpStr.size() && isspace(static_cast(tmpStr[0]))) { + while (tmpStr.size() && isSpace(tmpStr[0])) { tmpStr.deleteChar(0); // This is not very fast, but it is the simplest way to // assure we do not mess something up because of kerning. -- cgit v1.2.3