forked from mirror/OpenTTD
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
This commit is contained in:
@@ -3065,7 +3065,7 @@ static void SaveLoad_STNS(Station *st)
|
||||
|
||||
if (st->num_specs != 0) {
|
||||
/* Allocate speclist memory when loading a game */
|
||||
if (st->speclist == NULL) CallocT(&st->speclist, st->num_specs);
|
||||
if (st->speclist == NULL) st->speclist = CallocT<StationSpecList>(st->num_specs);
|
||||
for (i = 0; i < st->num_specs; i++) SlObject(&st->speclist[i], _station_speclist_desc);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user