[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.250,1.251
Max Horn
fingolfin at users.sourceforge.net
Sat Oct 22 16:50:50 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14561
Modified Files:
saveload.cpp
Log Message:
Gee, should pay more attention and read comments I myself added years ago...
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -d -r1.250 -r1.251
--- saveload.cpp 22 Oct 2005 23:47:39 -0000 1.250
+++ saveload.cpp 22 Oct 2005 23:49:29 -0000 1.251
@@ -142,8 +142,12 @@
// 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;
More information about the Scummvm-git-logs
mailing list