From 8469b8749c9e710992d22bdfa07e6afcff9cfd4d Mon Sep 17 00:00:00 2001 From: Andrei Prykhodko Date: Mon, 8 Apr 2019 23:07:14 +0300 Subject: [PATCH] COMMON: fixed reading ini files with section containing more than one word --- common/ini-file.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/ini-file.cpp b/common/ini-file.cpp index 7e5a098b4ea..1bf0a0eec6c 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')