HLE_OS: More bounds checking in GetStringVA
This commit is contained in:
parent
3d80d454ce
commit
b47e607105
|
@ -87,8 +87,14 @@ std::string GetStringVA(u32 strReg)
|
||||||
result += '%';
|
result += '%';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
while (string[i] < 'A' || string[i] > 'z' || string[i] == 'l' || string[i] == '-')
|
|
||||||
|
while (i < string.size() &&
|
||||||
|
(string[i] < 'A' || string[i] > 'z' || string[i] == 'l' || string[i] == '-'))
|
||||||
|
{
|
||||||
ArgumentBuffer += string[i++];
|
ArgumentBuffer += string[i++];
|
||||||
|
}
|
||||||
|
if (i >= string.size())
|
||||||
|
break;
|
||||||
|
|
||||||
ArgumentBuffer += string[i];
|
ArgumentBuffer += string[i];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue