diff options
author | Peter Nelson <peter1138@openttd.org> | 2019-01-28 21:54:06 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-02-02 21:39:06 +0000 |
commit | ea4ea628163c735db4c4714966c9bc1c560e0f61 (patch) | |
tree | bbbbaeae65879ec9876f08c42c71b9cad3ef5438 /src/saveload/saveload.h | |
parent | bdf0dc67e98ea551b9f96d91ced301404137620f (diff) | |
download | openttd-ea4ea628163c735db4c4714966c9bc1c560e0f61.tar.xz |
Codechange: Make saveload version upper bound exclusive, i.e. version object was removed instead of version object last appeared.
Diffstat (limited to 'src/saveload/saveload.h')
-rw-r--r-- | src/saveload/saveload.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index b6fc59c6e..8a2eeead2 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -483,14 +483,14 @@ static inline bool IsSavegameVersionBefore(uint16 major, byte minor = 0) /** * Checks if some version from/to combination falls within the range of the * active savegame version. - * @param version_from Lowest version number that falls within the range. - * @param version_to Highest version number that falls within the range. + * @param version_from Inclusive savegame version lower bound. + * @param version_to Exclusive savegame version upper bound. SL_MAX_VERSION if no upper bound. * @return Active savegame version falls within the given range. */ static inline bool SlIsObjectCurrentlyValid(uint16 version_from, uint16 version_to) { extern const uint16 SAVEGAME_VERSION; - if (SAVEGAME_VERSION < version_from || SAVEGAME_VERSION > version_to) return false; + if (SAVEGAME_VERSION < version_from || SAVEGAME_VERSION >= version_to) return false; return true; } |