From 5c9c66d11372dae31a485e39684ecd8a5b65b274 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 17 Dec 2009 17:06:51 +0100 Subject: Disallow apporting from the map boundary (shop inventories). --- crawl-ref/source/spells4.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 1ecaa4bd06..992b768ed5 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1765,8 +1765,9 @@ bool cast_apportation(int pow, const coord_def& where) } // Let's look at the top item in that square... + // And don't allow apporting from shop inventories. const int item_idx = igrd(where); - if (item_idx == NON_ITEM) + if (item_idx == NON_ITEM || !in_bounds(where)) { // Maybe the player *thought* there was something there (a mimic.) if (monsters* m = monster_at(where)) -- cgit v1.2.3-54-g00ecf