diff --git a/core/TextParsers.cpp b/core/TextParsers.cpp index 9cc6c231..87b68311 100644 --- a/core/TextParsers.cpp +++ b/core/TextParsers.cpp @@ -48,7 +48,7 @@ static int g_ws_chartable[255] = {0}; bool TextParsers::IsWhitespace(const char *stream) { - return g_ws_chartable[(unsigned)*stream] == 1; + return g_ws_chartable[(unsigned char)*stream] == 1; } TextParsers::TextParsers() @@ -508,7 +508,7 @@ SMCError TextParsers::ParseStream_SMC(void *stream, else { /* Check if we're whitespace or not */ - if (!g_ws_chartable[(unsigned)c]) + if (!g_ws_chartable[(unsigned char)c]) { bool restage = false; /* Check various special tokens: @@ -823,7 +823,7 @@ bool TextParsers::ParseFile_INI(const char *file, ITextListener_INI *ini_listene ***************************************************/ /* First strip beginning whitespace */ - while (*ptr != '\0' && g_ws_chartable[(unsigned)*ptr] != 0) + while (*ptr != '\0' && g_ws_chartable[(unsigned char)*ptr] != 0) { ptr++; } @@ -876,7 +876,7 @@ bool TextParsers::ParseFile_INI(const char *file, ITextListener_INI *ini_listene /* Lastly, strip ending whitespace off */ for (size_t i=len-1; i>=0 && i