(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.
authortron
Mon, 13 Dec 2004 07:41:04 +0000
changeset 617 279ed033e2d4
parent 616 63b0ac55529e
child 618 c434c460c064
(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
--- a/saveload.c	Sun Dec 12 22:05:08 2004 +0000
+++ b/saveload.c	Mon Dec 13 07:41:04 2004 +0000
@@ -536,7 +536,8 @@
 	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;