mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-30 10:11:34 +00:00
fixed case handling problem for local variable access
This commit is contained in:
parent
388735046f
commit
dc433a3c09
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue