[Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.283.2.2,1.283.2.3

Eugene Sandulenko sev at users.sourceforge.net
Sat Dec 18 18:27:03 CET 2004


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

Modified Files:
      Tag: branch-0-7-0
	scumm.cpp 
Log Message:
Add MD5 check from HEAD branch.


Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.283.2.2
retrieving revision 1.283.2.3
diff -u -d -r1.283.2.2 -r1.283.2.3
--- scumm.cpp	18 Dec 2004 11:08:13 -0000	1.283.2.2
+++ scumm.cpp	19 Dec 2004 02:26:37 -0000	1.283.2.3
@@ -444,6 +444,17 @@
 	// Copy MD5 checksum
 	memcpy(_gameMD5, md5sum, 16);
 
+	// Check for unknown MD5
+	char md5str[32+1];
+	for (int j = 0; j < 16; j++) {
+		sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
+	}
+	const MD5Table *elem;
+	elem = (const MD5Table *)bsearch(md5str, md5table, ARRAYSIZE(md5table)-1, sizeof(MD5Table), compareMD5Table);
+
+	if (!elem)
+		printf("Unknown MD5! Please report the details (language, platform, etc.) of this game to the ScummVM team\n");
+
 	// Add default file directories.
 	if (((_features & GF_AMIGA) || (_features & GF_ATARI_ST)) && (_version <= 4)) {
 		// This is for the Amiga version of Indy3/Loom/Maniac/Zak





More information about the Scummvm-git-logs mailing list