1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-07-15 07:21:46 +00:00

fixed case handling problem for local variable access

This commit is contained in:
Marc Zinnschlag 2014-02-12 13:38:16 +01:00
parent 388735046f
commit dc433a3c09

View file

@ -221,8 +221,10 @@ namespace MWScript
throw std::runtime_error ("invalid variable type");
}
std::string variable2 = Misc::StringUtils::lowerCase (variable);
for (int i=0; i<size; ++i)
if (script->mVarNames.at (i+offset)==variable)
if (Misc::StringUtils::lowerCase (script->mVarNames.at (i+offset))==variable2)
return i;
throw std::runtime_error ("unable to access local variable " + variable + " of " + scriptId);