1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Restore checking of last entry's size

This commit is contained in:
Michał Janiszewski
2016-05-14 00:21:15 +02:00
parent 5c2e55723b
commit f458dec3e9

View File

@@ -140,6 +140,8 @@ static void object_list_sort()
sortLUT[i] = i;
} while (++i < numObjects && (entry = object_get_next(entry)));
qsort(sortLUT, numObjects, sizeof(size_t), object_comparator);
// Get size of last entry so buffer is allocated properly.
entry = object_get_next(entry);
// Get buffer size
bufferSize = (uintptr_t)entry - (uintptr_t)*objectBuffer;