diff options
author | truebrain <truebrain@openttd.org> | 2009-01-13 21:32:47 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2009-01-13 21:32:47 +0000 |
commit | 89da8820e5689856b99bba66902fe6000ffdcf04 (patch) | |
tree | 726b846fe822b9c76cac28582fd9607c5fb4ec9a /src | |
parent | 2d3fc8141d91886164170ef066208752b4debab4 (diff) | |
download | openttd-89da8820e5689856b99bba66902fe6000ffdcf04.tar.xz |
(svn r15075) -Fix: store _next_competitor_start as uint32, else it might overflow for values > 2.4 years
Diffstat (limited to 'src')
-rw-r--r-- | src/saveload/misc_sl.cpp | 3 | ||||
-rw-r--r-- | src/saveload/saveload.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp index 4b8e8b2c7..5dd650c80 100644 --- a/src/saveload/misc_sl.cpp +++ b/src/saveload/misc_sl.cpp @@ -70,7 +70,8 @@ static const SaveLoadGlobVarList _date_desc[] = { SLEG_CONDVAR(_cur_town_ctr, SLE_FILE_U8 | SLE_VAR_U32, 0, 9), SLEG_CONDVAR(_cur_town_ctr, SLE_UINT32, 10, SL_MAX_VERSION), SLEG_VAR(_cur_company_tick_index, SLE_FILE_U8 | SLE_VAR_U32), - SLEG_VAR(_next_competitor_start, SLE_FILE_U16 | SLE_VAR_U32), + SLEG_CONDVAR(_next_competitor_start, SLE_FILE_U16 | SLE_VAR_U32, 0, 108), + SLEG_CONDVAR(_next_competitor_start, SLE_UINT32, 109, SL_MAX_VERSION), SLEG_VAR(_trees_tick_ctr, SLE_UINT8), SLEG_CONDVAR(_pause_game, SLE_UINT8, 4, SL_MAX_VERSION), SLEG_CONDVAR(_cur_town_iter, SLE_UINT32, 11, SL_MAX_VERSION), diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 47934e928..badef5e0c 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -42,7 +42,7 @@ #include <list> -extern const uint16 SAVEGAME_VERSION = 108; +extern const uint16 SAVEGAME_VERSION = 109; SavegameType _savegame_type; ///< type of savegame we are loading |