1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00

Fix incorrect pointer maths. Fixes #1511.

This commit is contained in:
Duncan Frost
2015-06-28 19:46:08 +01:00
parent ed41c2b995
commit 2c3c8dc188

View File

@@ -2759,7 +2759,7 @@ void map_reorganise_elements()
}
}
uint32 num_elements = (new_elements_pointer - new_map_elements) / sizeof(rct_map_element);
uint32 num_elements = (new_elements_pointer - new_map_elements);
memcpy(RCT2_ADDRESS(RCT2_ADDRESS_MAP_ELEMENTS, rct_map_element), new_map_elements, num_elements * sizeof(rct_map_element));
memset(new_map_elements + num_elements, 0, (0x30000 - num_elements) * sizeof(rct_map_element));