mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 11:33:03 +01:00
Ensure null objects are written as -1 to SV6
This commit is contained in:
committed by
Michael Steenbeek
parent
3a9dc3f491
commit
88742dce80
@@ -166,7 +166,8 @@ void S6Exporter::Export()
|
||||
{
|
||||
const rct_object_entry * entry = get_loaded_object_entry(i);
|
||||
void * entryData = get_loaded_object_chunk(i);
|
||||
if (entryData == (void *)-1)
|
||||
// RCT2 uses (void *)-1 to mark NULL. Make sure it's written in a vanilla-compatible way.
|
||||
if (entryData == nullptr || entryData == (void *)-1)
|
||||
{
|
||||
Memory::Set(&_s6.objects[i], 0xFF, sizeof(rct_object_entry));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user