mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-07 10:48:43 +00:00
WME: Fix bug #6531 - "WME: Art of Murder - Assertion"
This commit is contained in:
parent
b06497f351
commit
5d0ebad996
@ -298,7 +298,9 @@ bool SXString::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack
|
||||
|
||||
uint32 start = 0;
|
||||
for(uint32 i = 0; i < str.size() + 1; i++) {
|
||||
uint32 ch = str[i];
|
||||
// The [] operator doesn't allow access to the zero code terminator
|
||||
// (bug #6531)
|
||||
uint32 ch = (i == str.size()) ? '\0' : str[i];
|
||||
if (ch =='\0' || delims.contains(ch)) {
|
||||
if (i != start) {
|
||||
parts.push_back(WideString(str.c_str() + start, i - start + 1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user