Skip to content

Commit

Permalink
Skip negative tile indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
amarillion committed May 11, 2020
1 parent ef4a85f commit ff21071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/level.cpp
Expand Up @@ -90,7 +90,7 @@ RoomSet *RoomSet::loadFromXml (DomNode *n, Resources *res)
int tile = teg_mapget(ri.map, 2, x, y);
int flag = ri.map->tilelist->tiles[tile].flags;

if (flag >= 100)
if (tile >= 0 && flag >= 100)
{
ObjectInfo oi;
oi.x = x;
Expand Down

0 comments on commit ff21071

Please sign in to comment.