mirror of https://github.com/OpenTTD/OpenTTD
(svn r19985) -Fix (r19980): Loading preview data from old savegames failed indeterministically due to non-zeroed memory allocation. Thanks smatz.
parent
ff89345a5c
commit
58f2a1d014
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue