Skip to content

Commit

Permalink
WME: Fix bug #6531 - "WME: Art of Murder - Assertion"
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegr committed Feb 18, 2014
1 parent b06497f commit 5d0ebad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engines/wintermute/base/scriptables/script_ext_string.cpp
Expand Up @@ -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));
Expand Down

0 comments on commit 5d0ebad

Please sign in to comment.