aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2005-10-22 23:49:29 +0000
committerMax Horn2005-10-22 23:49:29 +0000
commit578dc7914ecc24cac00559fc7448435ff839ae7f (patch)
tree6ee2eb23e6ec915df055d72ad936b82bfad56ec9
parent117192363ce2ef458f0a234100aaf2b979c4a1a3 (diff)
downloadscummvm-rg350-578dc7914ecc24cac00559fc7448435ff839ae7f.tar.gz
scummvm-rg350-578dc7914ecc24cac00559fc7448435ff839ae7f.tar.bz2
scummvm-rg350-578dc7914ecc24cac00559fc7448435ff839ae7f.zip
Gee, should pay more attention and read comments I myself added years ago...
svn-id: r19248
-rw-r--r--scumm/saveload.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 032013efd0..4ff2375aee 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -142,8 +142,12 @@ bool ScummEngine::loadState(int slot, bool compat) {
// We account for that by retrying once with swapped byte order.
if (hdr.ver > CURRENT_VER)
hdr.ver = SWAP_BYTES_32(hdr.ver);
- if (hdr.ver < VER(8) || hdr.ver > CURRENT_VER)
- {
+
+ // Reject save games which are too old or too new. Note that
+ // We do not really support V7 games, but still accept them here
+ // to work around a bug from the stone age (see below for more
+ // information).
+ if (hdr.ver < VER(7) || hdr.ver > CURRENT_VER) {
warning("Invalid version of '%s'", filename);
delete in;
return false;