[Scummvm-cvs-logs] SF.net SVN: scummvm:[41361] scummvm/trunk/engines/sci/engine/savegame.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Jun 8 01:29:11 CEST 2009
Revision: 41361
http://scummvm.svn.sourceforge.net/scummvm/?rev=41361&view=rev
Author: thebluegr
Date: 2009-06-07 23:29:11 +0000 (Sun, 07 Jun 2009)
Log Message:
-----------
Hopefully fixed memory corruption when loading games
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/savegame.cpp
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2009-06-07 23:05:11 UTC (rev 41360)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2009-06-07 23:29:11 UTC (rev 41361)
@@ -798,8 +798,8 @@
str = &retval->sys_strings->strings[i];
char *data = (char *)str->value;
if (data) {
- str->value = (reg_t *)calloc(str->max_size+1, sizeof(char)); // FIXME -- sizeof(char) or sizeof(reg_t) ??
- strncpy((char *)str->value, data, str->max_size+1); // FIXME -- strncpy or internal_stringfrag_strncpy ?
+ str->value = (reg_t *)calloc(str->max_size + 1, sizeof(reg_t));
+ strncpy((char *)str->value, data, str->max_size + 1); // FIXME -- strncpy or internal_stringfrag_strncpy ?
free(data);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list