aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--simon/simon.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index cecd28c962..fb78d4bfa4 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -318,20 +318,11 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
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);