summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-27 12:47:47 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-27 12:47:47 +0000
commit3fcb72171adea6dd0bd33cb645b50856ce9dc3d0 (patch)
tree03c01f5367dc220506de593c3eae7ca88bd85b2f /crawl-ref/source/misc.cc
parent4090753ab23242839b7afbae48f7aa2e3d64c5fc (diff)
downloadcrawl-ref-3fcb72171adea6dd0bd33cb645b50856ce9dc3d0.tar.gz
crawl-ref-3fcb72171adea6dd0bd33cb645b50856ce9dc3d0.zip
Fixed T&D bug: couldn't search at all with T&D zero.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@710 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-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 )
{