summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-13 19:11:31 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-13 19:11:31 -0800
commit59caf0a6e21f6437e001c5ed07590f32b6ea86a7 (patch)
treebd6d7d5ac1bef5a8d8d4719b64f8042b355b5711 /crawl-ref/source
parent9e438662873c5b74baefce84f2da4a018e3b9d3f (diff)
downloadcrawl-ref-59caf0a6e21f6437e001c5ed07590f32b6ea86a7.tar.gz
crawl-ref-59caf0a6e21f6437e001c5ed07590f32b6ea86a7.zip
view.c: fix magic-mapping crash
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/view.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 4d91e96a46..ca9966dfbd 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -303,6 +303,9 @@ static std::auto_ptr<FixedArray<bool, GXM, GYM> > _tile_detectability()
coord_def p = flood_from.back();
flood_from.pop_back();
+ if (!in_bounds(p))
+ continue;
+
if ((*map)(p))
continue;