(svn r19985) -Fix (r19980): Loading preview data from old savegames failed indeterministically due to non-zeroed memory allocation. Thanks smatz.

This commit is contained in:
frosch
2010-06-13 14:52:42 +00:00
parent 5f6534b5ec
commit 9468cce730

View File

@@ -344,6 +344,7 @@ static void Check_PLYR()
int index; int index;
while ((index = SlIterateArray()) != -1) { while ((index = SlIterateArray()) != -1) {
CompanyProperties *cprops = new CompanyProperties(); CompanyProperties *cprops = new CompanyProperties();
memset(cprops, 0, sizeof(*cprops));
SaveLoad_PLYR_common(NULL, cprops); SaveLoad_PLYR_common(NULL, cprops);
/* We do not load old custom names */ /* We do not load old custom names */