[Scummvm-cvs-logs] CVS: scummvm/scumm script_v72he.cpp,2.48,2.49
Travis Howell
kirben at users.sourceforge.net
Sun Sep 5 03:29:01 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17436/scumm
Modified Files:
script_v72he.cpp
Log Message:
Valgrind warning
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.48
retrieving revision 2.49
diff -u -d -r2.48 -r2.49
--- script_v72he.cpp 5 Sep 2004 10:16:01 -0000 2.48
+++ script_v72he.cpp 5 Sep 2004 10:28:30 -0000 2.49
@@ -538,23 +538,24 @@
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)
More information about the Scummvm-git-logs
mailing list