summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-12 23:31:45 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-12 23:31:45 +0300
commitbfeeb73c4fda81f6a94e16a66f374fe14fe591c0 (patch)
treeb9ef1c910d4875d21cfc7ea8572572c6aeef59be /src
parent4f927ef3e48d8543fcb0c1fc99798b20037d9170 (diff)
downloadmanaplus-bfeeb73c4fda81f6a94e16a66f374fe14fe591c0.tar.gz
manaplus-bfeeb73c4fda81f6a94e16a66f374fe14fe591c0.tar.bz2
manaplus-bfeeb73c4fda81f6a94e16a66f374fe14fe591c0.tar.xz
manaplus-bfeeb73c4fda81f6a94e16a66f374fe14fe591c0.zip
Add missing checks to map.cpp
Diffstat (limited to 'src')
-rw-r--r--src/map.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map.cpp b/src/map.cpp
index af40e68e5..ebad60f84 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -895,7 +895,7 @@ Path Map::findPath(int startX, int startY, int destX, int destY,
// Path to be built up (empty by default)
Path path;
- if (startX >= mWidth || startY >= mHeight)
+ if (startX >= mWidth || startY >= mHeight || startX < 0 || startY < 0)
return path;
// Return when destination not walkable