summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-10 02:44:01 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-10 02:44:01 +0000
commit95a217139ca96e4b51cb6a9deed9807fe22fd0d9 (patch)
tree0e957d8e02bbccabe19072a1b54c6b050ade5d49 /crawl-ref/source/spells3.cc
parent1ef09d3a6fedddff10e68c836286415c45ce7dce (diff)
downloadcrawl-ref-95a217139ca96e4b51cb6a9deed9807fe22fd0d9.tar.gz
crawl-ref-95a217139ca96e4b51cb6a9deed9807fe22fd0d9.zip
In _raise_corpse(), if animating a corpse fails because there's nowhere
to place the resulting zombie, return false and don't destroy the corpse. This should fix [1988590]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5691 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index de4fb55810..bc8ed70904 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -893,11 +893,13 @@ static bool _raise_corpse(int x, int y, int corps, beh_type beha,
}
_equip_undead(x, y, corps, monster, monnum);
- }
- destroy_item(corps);
+ destroy_item(corps);
- return (true);
+ return (true);
+ }
+
+ return (false);
}
bool animate_a_corpse(int x, int y, corpse_type class_allowed,