aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Prykhodko2019-04-08 23:07:14 +0300
committerFilippos Karapetis2019-04-09 21:02:29 +0300
commit8469b8749c9e710992d22bdfa07e6afcff9cfd4d (patch)
treebba8063bb33aaca4a8e5643c0341d2d39ef38980
parent66813c9fc21ada8da516c25c9f71b6b83a5f25b8 (diff)
downloadscummvm-rg350-8469b8749c9e710992d22bdfa07e6afcff9cfd4d.tar.gz
scummvm-rg350-8469b8749c9e710992d22bdfa07e6afcff9cfd4d.tar.bz2
scummvm-rg350-8469b8749c9e710992d22bdfa07e6afcff9cfd4d.zip
COMMON: fixed reading ini files with section containing more than one word
-rw-r--r--common/ini-file.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/ini-file.cpp b/common/ini-file.cpp
index 7e5a098b4e..1bf0a0eec6 100644
--- a/common/ini-file.cpp
+++ b/common/ini-file.cpp
@@ -30,7 +30,7 @@ namespace Common {
bool INIFile::isValidName(const String &name) {
const char *p = name.c_str();
- while (*p && (isAlnum(*p) || *p == '-' || *p == '_' || *p == '.'))
+ while (*p && (isAlnum(*p) || *p == '-' || *p == '_' || *p == '.' || *p == ' '))
p++;
return *p == 0;
}
@@ -108,7 +108,7 @@ bool INIFile::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(*p) || *p == '-' || *p == '_' || *p == '.' || *p == ' '))
p++;
if (*p == '\0')