aboutsummaryrefslogtreecommitdiff
path: root/common/config-file.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-07-20 09:27:39 -0400
committerMatthew Hoops2011-07-20 09:27:39 -0400
commitad293b249e74dd1cfbdbd721d02145efbdaf9eca (patch)
treee568d96f6d7f64c5e58b4c7cd1c4fda7e649bfc7 /common/config-file.cpp
parentd7411acc2b1c7702280dbff1c3e1bafee528184b (diff)
parente25e85fbb047fef895ede97c3c2c73451631052c (diff)
downloadscummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.tar.gz
scummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.tar.bz2
scummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'common/config-file.cpp')
-rw-r--r--common/config-file.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/config-file.cpp b/common/config-file.cpp
index 55941131ac..ea3feff8ae 100644
--- a/common/config-file.cpp
+++ b/common/config-file.cpp
@@ -38,7 +38,7 @@ namespace Common {
*/
bool ConfigFile::isValidName(const Common::String &name) {
const char *p = name.c_str();
- while (*p && (isalnum(*p) || *p == '-' || *p == '_' || *p == '.'))
+ while (*p && (isalnum(static_cast<unsigned char>(*p)) || *p == '-' || *p == '_' || *p == '.'))
p++;
return *p == 0;
}
@@ -116,7 +116,7 @@ bool ConfigFile::loadFromStream(SeekableReadStream &stream) {
// is, verify that it only consists of alphanumerics,
// periods, dashes and underscores). Mohawk Living Books games
// can have periods in their section names.
- while (*p && (isalnum(*p) || *p == '-' || *p == '_' || *p == '.'))
+ while (*p && (isalnum(static_cast<unsigned char>(*p)) || *p == '-' || *p == '_' || *p == '.'))
p++;
if (*p == '\0')
@@ -139,7 +139,7 @@ bool ConfigFile::loadFromStream(SeekableReadStream &stream) {
// Skip leading whitespaces
const char *t = line.c_str();
- while (isspace(*t))
+ while (isspace(static_cast<unsigned char>(*t)))
t++;
// Skip empty lines / lines with only whitespace