(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:
@@ -560,7 +560,7 @@ static void MakeSortedIndustryList(void)
|
||||
if (GetNumIndustries() == 0) return;
|
||||
|
||||
/* Create array for sorting */
|
||||
ReallocT(&_industry_sort, GetMaxIndustryIndex() + 1);
|
||||
_industry_sort = ReallocT(_industry_sort, GetMaxIndustryIndex() + 1);
|
||||
if (_industry_sort == NULL) error("Could not allocate memory for the industry-sorting-list");
|
||||
|
||||
FOR_ALL_INDUSTRIES(i) _industry_sort[n++] = i;
|
||||
|
Reference in New Issue
Block a user