1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +01:00

Add upper bounds

This commit is contained in:
Duncan Frost
2015-01-29 17:47:35 +00:00
parent fddcfc69e0
commit 359cc9aa99

View File

@@ -88,7 +88,7 @@ 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)
if (x < 0 || y < 0 || x > 255 || y > 255)
{
log_error("Trying to access element outside of range");
return NULL;