mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Do a bounds check before calling functions defined in cctype
This commit is contained in:
parent
c01ba41aa6
commit
751e8cf76b
9 changed files with 44 additions and 37 deletions
|
@ -172,8 +172,7 @@ namespace Interpreter{
|
|||
|
||||
for(unsigned int j = 0; j < globals.size(); j++){
|
||||
if(globals[j].length() > temp.length()){ // Just in case there's a global with a huuuge name
|
||||
temp = text.substr(i+1, globals[j].length());
|
||||
transform(temp.begin(), temp.end(), temp.begin(), ::tolower);
|
||||
temp = Misc::StringUtils::lowerCase(text.substr(i+1, globals[j].length()));
|
||||
}
|
||||
|
||||
found = check(temp, globals[j], &i, &start);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue