(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:
@@ -410,7 +410,7 @@ static void MakeSortedTownList(void)
|
||||
uint n = 0;
|
||||
|
||||
/* Create array for sorting */
|
||||
ReallocT(&_town_sort, GetMaxTownIndex() + 1);
|
||||
_town_sort = ReallocT(_town_sort, GetMaxTownIndex() + 1);
|
||||
if (_town_sort == NULL) error("Could not allocate memory for the town-sorting-list");
|
||||
|
||||
FOR_ALL_TOWNS(t) _town_sort[n++] = t;
|
||||
|
Reference in New Issue
Block a user