From 578dc7914ecc24cac00559fc7448435ff839ae7f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 22 Oct 2005 23:49:29 +0000 Subject: Gee, should pay more attention and read comments I myself added years ago... svn-id: r19248 --- scumm/saveload.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scumm/saveload.cpp') 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; -- cgit v1.2.3