mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 12:40:25 +00:00
Strip quotes when treating keywords as strings
This commit is contained in:
parent
ff0fd2f684
commit
22f7d4eee2
2 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
Bug #3737: Scripts from The Underground 2 .esp do not play (all patched versions)
|
Bug #3737: Scripts from The Underground 2 .esp do not play (all patched versions)
|
||||||
Bug #3846: Strings starting with "-" fail to compile if not enclosed in quotes
|
Bug #3846: Strings starting with "-" fail to compile if not enclosed in quotes
|
||||||
Bug #5483: AutoCalc flag is not used to calculate spells cost
|
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
|
Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime
|
||||||
|
|
||||||
0.47.0
|
0.47.0
|
||||||
|
|
|
@ -65,7 +65,11 @@ namespace Compiler
|
||||||
keyword==Scanner::K_messagebox || keyword==Scanner::K_set ||
|
keyword==Scanner::K_messagebox || keyword==Scanner::K_set ||
|
||||||
keyword==Scanner::K_to || keyword==Scanner::K_getsquareroot)
|
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);
|
return Parser::parseKeyword (keyword, loc, scanner);
|
||||||
|
|
Loading…
Reference in a new issue