summaryrefslogtreecommitdiff
path: root/src/saveload/saveload.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2020-12-22 10:44:07 +0100
committerGitHub <noreply@github.com>2020-12-22 10:44:07 +0100
commitd8c8f4e72d8a8f9306bc4e6a86c012dee740c8ca (patch)
tree6a10a3b5374b3e085f5b084d5ae467acd3e9467d /src/saveload/saveload.cpp
parent6c3a5b5b17de97be292fc9442f6bd693973114ee (diff)
downloadopenttd-d8c8f4e72d8a8f9306bc4e6a86c012dee740c8ca.tar.xz
Fix: next 67 savegame versions are used in PatchPacks; skip them (#8411)
Various of PatchPacks (Spring 2013, Joker, ChillPP) used versions slightly higher than ours. Of course, as time went by, this caught up with us, and we are now almost pushing a new version that would conflict with them. To avoid users creating unneeded issues about "why can I not load my savegame", lets be ahead of the curve and flat-out refuse to load them. Version-wise, this is totally fine. We have ~32k versions to go before we run out (0x8000 is masked by JGRPP; we should avoid using that). At the rate we bump savegames, this is not going to happen in any sane reality.
Diffstat (limited to 'src/saveload/saveload.cpp')
-rw-r--r--src/saveload/saveload.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 5288f9047..4f3b7e991 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -2689,6 +2689,7 @@ static SaveOrLoadResult DoLoad(LoadFilter *reader, bool load_check)
/* Is the version higher than the current? */
if (_sl_version > SAVEGAME_VERSION) SlError(STR_GAME_SAVELOAD_ERROR_TOO_NEW_SAVEGAME);
+ if (_sl_version >= SLV_START_PATCHPACKS && _sl_version <= SLV_END_PATCHPACKS) SlError(STR_GAME_SAVELOAD_ERROR_PATCHPACK);
break;
}