summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp
index d35133bcc..e9ce78bd0 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -696,7 +696,7 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY,
}
}
- if (!getWalk(x, y, BLOCKMASK_AIR))
+ if (x < endX && !getWalk(x, y, BLOCKMASK_AIR))
{
width = 32;
for (int x2 = x + 1; x < endX; x2 ++)
@@ -718,7 +718,7 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY,
}
}
- if (!getWalk(x, y, BLOCKMASK_WATER))
+ if (x < endX && !getWalk(x, y, BLOCKMASK_WATER))
{
width = 32;
for (int x2 = x + 1; x < endX; x2 ++)