Add upper bounds

This commit is contained in:
Duncan Frost 2015-01-29 17:47:35 +00:00
parent fddcfc69e0
commit 359cc9aa99
1 changed files with 1 additions and 1 deletions

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;