summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/misc.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index f41f650cb9..61f1ab7905 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -259,6 +259,8 @@ void search_around( bool only_adjacent )
max_dist = 5;
if ( max_dist > 1 && only_adjacent )
max_dist = 1;
+ if ( max_dist < 1 )
+ max_dist = 1;
for ( int srx = you.x_pos - max_dist; srx <= you.x_pos + max_dist; ++srx )
{