summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r--crawl-ref/source/spells4.cc3
1 files changed, 2 insertions, 1 deletions
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))