[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.236,1.237

Eugene Sandulenko sev at users.sourceforge.net
Thu Oct 13 16:21:32 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28371

Modified Files:
	saveload.cpp 
Log Message:
Add possibility to see exact md5s of your game and save when they don't
match. It's on debuglevel 1.


Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -d -r1.236 -r1.237
--- saveload.cpp	13 Oct 2005 18:50:53 -0000	1.236
+++ saveload.cpp	13 Oct 2005 23:20:41 -0000	1.237
@@ -926,7 +926,13 @@
 	// MD5 Operations: Backup on load, compare, and reset.
 	if (s->isLoading())
 		if (memcmp(md5Backup, _gameMD5, 16) != 0) {
+			char md5str1[32+1], md5str2[32+1];
+			for (j = 0; j < 16; j++) {
+				sprintf(md5str1 + j*2, "%02x", (int)_gameMD5[j]);
+				sprintf(md5str2 + j*2, "%02x", (int)md5Backup[j]);
+			}
 			warning("Game was saved with different gamedata - you may encounter problems.");
+			debug(1, "You have %s and save is %s.", md5str2, md5str1);
  			memcpy(_gameMD5, md5Backup, 16);
 		}
 





More information about the Scummvm-git-logs mailing list