diff options
-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 |