diff options
author | frosch <frosch@openttd.org> | 2010-06-13 14:52:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-06-13 14:52:42 +0000 |
commit | 58f2a1d014066ab0746ee0d384ada406d2ddbb6d (patch) | |
tree | 17206ca563d9969e4bc87922442f70b9946f56fd /src/saveload | |
parent | ff89345a5c0fc5b2f97e847b340d1fcc0c0bfcaf (diff) | |
download | openttd-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.cpp | 1 |
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 */ |