aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2006-02-26 21:52:49 +0000
committerMax Horn2006-02-26 21:52:49 +0000
commit90c916de4be8aa44226d826ad3d40f8a0c0e3e3e (patch)
treed2030273b49fa28f10cb68a0acfe74a3d0f2a32a /engines/scumm
parentdc75adbb2513ae502577d17f130e19d12a44fc13 (diff)
downloadscummvm-rg350-90c916de4be8aa44226d826ad3d40f8a0c0e3e3e.tar.gz
scummvm-rg350-90c916de4be8aa44226d826ad3d40f8a0c0e3e3e.tar.bz2
scummvm-rg350-90c916de4be8aa44226d826ad3d40f8a0c0e3e3e.zip
Do not compute the MD5 checksum if an override for it is set
svn-id: r20948
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/plugin.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp
index 93b641bc2a..d70282d010 100644
--- a/engines/scumm/plugin.cpp
+++ b/engines/scumm/plugin.cpp
@@ -1252,7 +1252,7 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
return 0;
}
- // We now want to alculate the MD5 of the games detection file, so that we
+ // We now want to calculate the MD5 of the games detection file, so that we
// can store it in savegames etc..
const char *gameid = g->gameid;
char detectName[256], tempName[256], gameMD5[32+1];
@@ -1305,19 +1305,18 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
game.platform = Common::kPlatformMacintosh;
}
- // Compute the MD5 of the file, and (if we succeeded) store a hex version
- // of it in gameMD5 (useful to print it to the user in messages).
- if (Common::md5_file(detectName, md5sum, ConfMan.get("path").c_str(), kMD5FileSizeLimit)) {
- for (int j = 0; j < 16; j++) {
- sprintf(gameMD5 + j*2, "%02x", (int)md5sum[j]);
- }
- }
-
// Check if the MD5 was overwritten, if so, use that in the subsequent search
const char *md5;
if (ConfMan.hasKey("target_md5")) {
md5 = ConfMan.get("target_md5").c_str();
} else {
+ // Compute the MD5 of the file, and (if we succeeded) store a hex version
+ // of it in gameMD5 (useful to print it to the user in messages).
+ if (Common::md5_file(detectName, md5sum, ConfMan.get("path").c_str(), kMD5FileSizeLimit)) {
+ for (int j = 0; j < 16; j++) {
+ sprintf(gameMD5 + j*2, "%02x", (int)md5sum[j]);
+ }
+ }
md5 = gameMD5;
}