mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-13 06:15:36 -04:00
fixed case handling problem for local variable access
This commit is contained in:
parent
388735046f
commit
dc433a3c09
@ -221,8 +221,10 @@ namespace MWScript
|
|||||||
throw std::runtime_error ("invalid variable type");
|
throw std::runtime_error ("invalid variable type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string variable2 = Misc::StringUtils::lowerCase (variable);
|
||||||
|
|
||||||
for (int i=0; i<size; ++i)
|
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;
|
return i;
|
||||||
|
|
||||||
throw std::runtime_error ("unable to access local variable " + variable + " of " + scriptId);
|
throw std::runtime_error ("unable to access local variable " + variable + " of " + scriptId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user