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

Fix crash on non-legacy objects

This commit is contained in:
Hielke Morsink
2022-08-30 11:57:28 +02:00
parent ced6f1280f
commit bb84c181f3

View File

@@ -1294,7 +1294,7 @@ static int32_t cc_object_count(InteractiveConsole& console, [[maybe_unused]] con
int32_t entryGroupIndex = 0;
for (; entryGroupIndex < object_entry_group_counts[EnumValue(objectType)]; entryGroupIndex++)
{
if (object_entry_get_chunk(objectType, entryGroupIndex) == nullptr)
if (object_entry_get_object(objectType, entryGroupIndex) == nullptr)
{
break;
}