diff options
author | tron <tron@openttd.org> | 2004-12-13 07:41:04 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-13 07:41:04 +0000 |
commit | 523b37a3e9156d6ea2ca8f1bfdfdf9b95b4c4f1f (patch) | |
tree | 9504892d008dd865cb60fb93b6fc51feac3ebc00 | |
parent | 2690ba03b210f45ee154cff4e8417f86eae78e77 (diff) | |
download | openttd-523b37a3e9156d6ea2ca8f1bfdfdf9b95b4c4f1f.tar.xz |
(svn r1041) Under certain circumstances obsolete fields are included in the size calculation of a chunk in a savegame which leads to failed loads. This wasn't triggered because the necessary conditions weren't met.
-rw-r--r-- | saveload.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/saveload.c b/saveload.c index 299890f2c..dda3eefc1 100644 --- a/saveload.c +++ b/saveload.c @@ -536,7 +536,8 @@ static size_t SlCalcGlobListLength(const SaveLoadGlobVarList *desc) size_t length = 0; while (desc->address) { - length += SlCalcConvLen(desc->conv, NULL); + if(_sl.version >= desc->from_version && _sl.version <= desc->to_version) + length += SlCalcConvLen(desc->conv, NULL); desc++; } return length; |