diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-12 23:31:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-12 23:31:45 +0300 |
commit | bfeeb73c4fda81f6a94e16a66f374fe14fe591c0 (patch) | |
tree | b9ef1c910d4875d21cfc7ea8572572c6aeef59be | |
parent | 4f927ef3e48d8543fcb0c1fc99798b20037d9170 (diff) | |
download | manaplus-bfeeb73c4fda81f6a94e16a66f374fe14fe591c0.tar.gz manaplus-bfeeb73c4fda81f6a94e16a66f374fe14fe591c0.tar.bz2 manaplus-bfeeb73c4fda81f6a94e16a66f374fe14fe591c0.tar.xz manaplus-bfeeb73c4fda81f6a94e16a66f374fe14fe591c0.zip |
Add missing checks to map.cpp
-rw-r--r-- | src/map.cpp | 2 |
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 |