diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-23 03:04:23 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-23 03:04:23 -0800 |
commit | 73d6545ba6d67290e93ec9097c07da6bf7b84d79 (patch) | |
tree | f4fa40ea67d0dfbae1f656439bf24f11e220b1d4 /crawl-ref/source/spells3.cc | |
parent | c58f6e940aa83c0e1c9e6bcc6614adcc0e2a4d79 (diff) | |
download | crawl-ref-73d6545ba6d67290e93ec9097c07da6bf7b84d79.tar.gz crawl-ref-73d6545ba6d67290e93ec9097c07da6bf7b84d79.zip |
receive_corpses(): don't crash if no items avail
If there aren't any floor item slots available, don't crash.
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r-- | crawl-ref/source/spells3.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index aa9a370c32..a8ac9055d2 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -703,6 +703,9 @@ bool receive_corpses(int pow, coord_def where) dummy.type = mon_type; int index_of_corpse_created = get_item_slot(); + if (index_of_corpse_created == NON_ITEM) + break; + if (mons_genus(mon_type) == MONS_HYDRA) dummy.number = random2(20) + 1; |