(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.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
tron 20 years ago
parent 2690ba03b2
commit 523b37a3e9

@ -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;

Loading…
Cancel
Save