summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-06-13 14:52:42 +0000
committerfrosch <frosch@openttd.org>2010-06-13 14:52:42 +0000
commit58f2a1d014066ab0746ee0d384ada406d2ddbb6d (patch)
tree17206ca563d9969e4bc87922442f70b9946f56fd /src/saveload
parentff89345a5c0fc5b2f97e847b340d1fcc0c0bfcaf (diff)
downloadopenttd-58f2a1d014066ab0746ee0d384ada406d2ddbb6d.tar.xz
(svn r19985) -Fix (r19980): Loading preview data from old savegames failed indeterministically due to non-zeroed memory allocation. Thanks smatz.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/company_sl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp
index a3177c8ec..ada71cf72 100644
--- a/src/saveload/company_sl.cpp
+++ b/src/saveload/company_sl.cpp
@@ -344,6 +344,7 @@ static void Check_PLYR()
int index;
while ((index = SlIterateArray()) != -1) {
CompanyProperties *cprops = new CompanyProperties();
+ memset(cprops, 0, sizeof(*cprops));
SaveLoad_PLYR_common(NULL, cprops);
/* We do not load old custom names */