diff --git a/CHANGELOG.md b/CHANGELOG.md index 23814425a8..a14dab9d80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Bug #3846: Strings starting with "-" fail to compile if not enclosed in quotes Bug #5453: Magic effect VFX are offset for creatures Bug #5483: AutoCalc flag is not used to calculate spells cost + Bug #6066: addtopic "return" does not work from within script. No errors thrown Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime 0.47.0 diff --git a/components/compiler/stringparser.cpp b/components/compiler/stringparser.cpp index 1bacf79410..8b20377e1f 100644 --- a/components/compiler/stringparser.cpp +++ b/components/compiler/stringparser.cpp @@ -65,7 +65,11 @@ namespace Compiler keyword==Scanner::K_messagebox || keyword==Scanner::K_set || keyword==Scanner::K_to || keyword==Scanner::K_getsquareroot) { - return parseName (loc.mLiteral, loc, scanner); + // pretend this is not a keyword + std::string name = loc.mLiteral; + if (name.size()>=2 && name[0]=='"' && name[name.size()-1]=='"') + name = name.substr (1, name.size()-2); + return parseName (name, loc, scanner); } return Parser::parseKeyword (keyword, loc, scanner);