diff options
author | Travis Howell | 2004-09-05 10:28:30 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-05 10:28:30 +0000 |
commit | 548e51dce85d44d9da214a8b679d18aed5cff7ed (patch) | |
tree | 89f1722cc314fb3b357964392ce28b1ee871651f | |
parent | 80c9d31f54fd20bd07a5ac7f539473dc5862c7bc (diff) | |
download | scummvm-rg350-548e51dce85d44d9da214a8b679d18aed5cff7ed.tar.gz scummvm-rg350-548e51dce85d44d9da214a8b679d18aed5cff7ed.tar.bz2 scummvm-rg350-548e51dce85d44d9da214a8b679d18aed5cff7ed.zip |
Valgrind warning
svn-id: r14907
-rw-r--r-- | scumm/script_v72he.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 4853a53bfe..e1620d886f 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -538,23 +538,24 @@ void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) { int args[31]; int num = 0, val = 0; int len; - byte chr, name[256]; + byte chr, string[256]; + memset(string, 0, sizeof(string)); getStackList(args, ARRAYSIZE(args)); pop(); if (scriptString) { - addMessageToStack(_scriptPointer, name, sizeof(name)); + addMessageToStack(_scriptPointer, string, sizeof(string)); len = resStrLen(_scriptPointer); _scriptPointer += len + 1; } else { - len = copyScriptString(name); + len = copyScriptString(string); } while (len--) { - chr = name[num++]; + chr = string[num++]; if (chr == 0x25) { - chr = name[num++]; + chr = string[num++]; if (chr == 0x64) dst += snprintf((char *)dst, 5, "%d", args[val++]); else if (chr == 0x73) |