summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-29 17:44:56 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-29 17:44:56 +0000
commit1c4008ac7e3b974440732fb9c29d2d4d8c802238 (patch)
treedd2911ba2b6bf09fa070fc6f3b0d9496e1e89a45
parent739b8e0d2675fc4eb89185f858ce5575da85e597 (diff)
downloadcrawl-ref-1c4008ac7e3b974440732fb9c29d2d4d8c802238.tar.gz
crawl-ref-1c4008ac7e3b974440732fb9c29d2d4d8c802238.zip
Fix crash when summoning at the edge of the map.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2939 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/monplace.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 1a8b0c8044..f28088591a 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -1675,6 +1675,9 @@ bool empty_surrounds(int emx, int emy, unsigned char spc_wanted,
if (tx == you.x_pos && ty == you.y_pos)
continue;
+ if (!in_bounds(tx,ty))
+ continue;
+
if (mgrd[tx][ty] != NON_MONSTER)
continue;