summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index c7e4f5fbc..c00faa18c 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -275,6 +275,7 @@ bool CircularTileSearch(TileIndex *tile, uint size, TestTileOnSearchProc proc, v
/* If tile test is not successful, get one tile up,
* ready for a test in first circle around center tile */
*tile = TileAddByDir(*tile, DIR_N);
+ if (size / 2 == 0) return false;
return CircularTileSearch(tile, size / 2, 1, 1, proc, user_data);
} else {
return CircularTileSearch(tile, size / 2, 0, 0, proc, user_data);