diff options
Diffstat (limited to 'gui/ThemeParser.cpp')
-rw-r--r-- | gui/ThemeParser.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index fc960ca4d7..cd77b4a5e1 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -103,14 +103,15 @@ void ThemeParser::parseKeyValue(Common::String &key_name) { skipSpaces(); Common::String data; + char string_start; - if (_text[_pos] == '"') { - data += _text[_pos++]; + if (_text[_pos] == '"' || _text[_pos] == '\'') { + string_start = _text[_pos++]; - while (_text[_pos] != '"') + while (_text[_pos] != string_start) data += _text[_pos++]; - data += _text[_pos++]; + _pos++; } else { while (isValidNameChar(_text[_pos])) data += _text[_pos++]; @@ -131,7 +132,9 @@ bool ThemeParser::parse() { break; skipSpaces(); - skipComments(); + + if (skipComments()) + continue; switch (_state) { case kParserNeedKey: |