From 523b37a3e9156d6ea2ca8f1bfdfdf9b95b4c4f1f Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 13 Dec 2004 07:41:04 +0000 Subject: (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. --- saveload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2