[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.459,1.460

Chris Apers chrilith at users.sourceforge.net
Tue Nov 9 08:44:09 CET 2004


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

Modified Files:
	simon.cpp 
Log Message:
More PalmOS related cleanup

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.459
retrieving revision 1.460
diff -u -d -r1.459 -r1.460
--- simon.cpp	9 Nov 2004 10:34:40 -0000	1.459
+++ simon.cpp	9 Nov 2004 16:43:45 -0000	1.460
@@ -318,20 +318,11 @@
 			strcat(buf, ".");
 		
 		if (md5_file(buf, md5sum)) {
-			// HACK : changed to this code since PalmOS doesn't handle correctly %02x.
-			// It returns only 8 chars string in upper case so i need to use hex[],
-			// copy last 2 chars to md5str and convert result to lower case
-			int j;
 			char md5str[32+1];
-			char hex[8+1];
-			for (j = 0; j < 16; j++) {
-				sprintf(hex, "%02x", (int)md5sum[j]);
-				memcpy(md5str+j*2, hex + strlen(hex) - 2, 2);
+			for (int j = 0; j < 16; j++) {
+				sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
 			}
 
-			for (j = 0; j < 32; j++)
-				md5str[j] = tolower(md5str[j]);
-			md5str[32] = 0;
 			printf("%s  %s\n", md5str, buf);
 			const MD5Table *elem;
 			elem = (const MD5Table *)bsearch(md5str, md5table, ARRAYSIZE(md5table)-1, sizeof(MD5Table), compareMD5Table);





More information about the Scummvm-git-logs mailing list