diff options
author | rubidium <rubidium@openttd.org> | 2008-07-07 09:23:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-07 09:23:54 +0000 |
commit | 4db7c4f549e2a30236052db08ceb31cf4d7f0131 (patch) | |
tree | 26b8faeab45562ba7664a89fc0ab16b68cb86ccc | |
parent | b2479212ef407b9228ace5d04fb234bfd223f2da (diff) | |
download | openttd-4db7c4f549e2a30236052db08ceb31cf4d7f0131.tar.xz |
(svn r13679) -Fix [FS#2131]: saving TTD imported games in recession failed due to wrong (and unneeded) type conversions in the saveload code.
-rw-r--r-- | src/economy.cpp | 2 | ||||
-rw-r--r-- | src/economy_type.h | 2 | ||||
-rw-r--r-- | src/oldloader.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 4e9d85c9b..30180cee2 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1909,7 +1909,7 @@ static const SaveLoad _economy_desc[] = { SLE_CONDVAR(Economy, max_loan_unround, SLE_FILE_I32 | SLE_VAR_I64, 0, 64), SLE_CONDVAR(Economy, max_loan_unround, SLE_INT64, 65, SL_MAX_VERSION), SLE_CONDVAR(Economy, max_loan_unround_fract, SLE_UINT16, 70, SL_MAX_VERSION), - SLE_VAR(Economy, fluct, SLE_FILE_I16 | SLE_VAR_I32), + SLE_VAR(Economy, fluct, SLE_INT16), SLE_VAR(Economy, interest_rate, SLE_UINT8), SLE_VAR(Economy, infl_amount, SLE_UINT8), SLE_VAR(Economy, infl_amount_pr, SLE_UINT8), diff --git a/src/economy_type.h b/src/economy_type.h index ae00296ea..f516e57ef 100644 --- a/src/economy_type.h +++ b/src/economy_type.h @@ -15,7 +15,7 @@ struct Economy { Money max_loan; ///< Maximum possible loan Money max_loan_unround; ///< Economy fluctuation status uint16 max_loan_unround_fract; ///< Fraction of the unrounded max loan - int fluct; + int16 fluct; byte interest_rate; ///< Interest byte infl_amount; ///< inflation amount byte infl_amount_pr; ///< inflation rate for payment rates diff --git a/src/oldloader.cpp b/src/oldloader.cpp index 124efe4f3..90ec6ef79 100644 --- a/src/oldloader.cpp +++ b/src/oldloader.cpp @@ -1563,7 +1563,7 @@ static const OldChunks main_chunk[] = { OCL_VAR ( OC_FILE_U32 | OC_VAR_I64, 1, &_economy.max_loan ), OCL_VAR ( OC_FILE_U32 | OC_VAR_I64, 1, &_economy.max_loan_unround ), - OCL_VAR ( OC_FILE_U16 | OC_VAR_U32, 1, &_economy.fluct ), + OCL_VAR ( OC_INT16, 1, &_economy.fluct ), OCL_VAR ( OC_UINT16, 1, &_disaster_delay ), |