mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-01 11:15:13 +01:00
Add error logging to get_first_element_at
This commit is contained in:
@@ -88,6 +88,11 @@ void map_element_iterator_restart_for_tile(map_element_iterator *it)
|
||||
|
||||
rct_map_element *map_get_first_element_at(int x, int y)
|
||||
{
|
||||
if (x < 0 || y < 0)
|
||||
{
|
||||
log_error("Trying to access element outside of range");
|
||||
return NULL;
|
||||
}
|
||||
return TILE_MAP_ELEMENT_POINTER(x + y * 256);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user