diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-12 23:31:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-20 12:41:55 +0300 |
commit | c6731387783fc7ce5c3665df4bbd431584f1611e (patch) | |
tree | 00c7b9112987ca662e9918740763930fbfb1d753 | |
parent | e5e52b4500fa8e2c7a8357c6f38a8756b996d27c (diff) | |
download | plus-c6731387783fc7ce5c3665df4bbd431584f1611e.tar.gz plus-c6731387783fc7ce5c3665df4bbd431584f1611e.tar.bz2 plus-c6731387783fc7ce5c3665df4bbd431584f1611e.tar.xz plus-c6731387783fc7ce5c3665df4bbd431584f1611e.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 b649922ae..3c7fa0734 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 |