COMMON: fixed reading ini files with section containing more than one word
This commit is contained in:
parent
66813c9fc2
commit
8469b8749c
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ namespace Common {
|
||||||
|
|
||||||
bool INIFile::isValidName(const String &name) {
|
bool INIFile::isValidName(const String &name) {
|
||||||
const char *p = name.c_str();
|
const char *p = name.c_str();
|
||||||
while (*p && (isAlnum(*p) || *p == '-' || *p == '_' || *p == '.'))
|
while (*p && (isAlnum(*p) || *p == '-' || *p == '_' || *p == '.' || *p == ' '))
|
||||||
p++;
|
p++;
|
||||||
return *p == 0;
|
return *p == 0;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ bool INIFile::loadFromStream(SeekableReadStream &stream) {
|
||||||
// is, verify that it only consists of alphanumerics,
|
// is, verify that it only consists of alphanumerics,
|
||||||
// periods, dashes and underscores). Mohawk Living Books games
|
// periods, dashes and underscores). Mohawk Living Books games
|
||||||
// can have periods in their section names.
|
// can have periods in their section names.
|
||||||
while (*p && (isAlnum(*p) || *p == '-' || *p == '_' || *p == '.'))
|
while (*p && (isAlnum(*p) || *p == '-' || *p == '_' || *p == '.' || *p == ' '))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
if (*p == '\0')
|
if (*p == '\0')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue