aboutsummaryrefslogtreecommitdiff
path: root/scumm/saveload.cpp
diff options
context:
space:
mode:
authorJames Brown2004-09-12 12:15:19 +0000
committerJames Brown2004-09-12 12:15:19 +0000
commit0f2f3c0072773f678ac986eab717fc050adc4eb5 (patch)
tree8a279466a4a1b5b3359242e91bb3fc416f989f17 /scumm/saveload.cpp
parent4dbb77fc2a6b48c4e265f59357332549b945725f (diff)
downloadscummvm-rg350-0f2f3c0072773f678ac986eab717fc050adc4eb5.tar.gz
scummvm-rg350-0f2f3c0072773f678ac986eab717fc050adc4eb5.tar.bz2
scummvm-rg350-0f2f3c0072773f678ac986eab717fc050adc4eb5.zip
Be a Better Programmer (tm)
svn-id: r15034
Diffstat (limited to 'scumm/saveload.cpp')
-rw-r--r--scumm/saveload.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index d60232a730..f282060b16 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -665,23 +665,17 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) {
uint8 md5Backup[16];
// MD5 Operations: Backup on load, compare, and reset.
- if (s->isLoading()) {
- for (i=0; i<17; i++) md5Backup[i] = _gameMD5[i];
- }
+ if (s->isLoading())
+ memcpy(_gameMD5, md5Backup, 16);
s->saveLoadEntries(this, mainEntries);
// MD5 Operations: Backup on load, compare, and reset.
- if (s->isLoading()) {
- for (j = 0; j < 16; j++) {
- if (_gameMD5[j] != md5Backup[j]) {
- warning("Game was saved with different gamedata - you may encounter problems.");
- _gameMD5[j] = md5Backup[j];
- break;
- }
- _gameMD5[j] = md5Backup[j];
+ if (s->isLoading())
+ if (memcmp(md5Backup, _gameMD5, 16) != 0) {
+ warning("Game was saved with different gamedata - you may encounter problems.");
+ memcpy(_gameMD5, md5Backup, 16);
}
- }
if (s->isLoading() && savegameVersion < VER(14))