1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +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);