diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-02 22:18:42 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-02 22:18:42 +0000 |
commit | d93ab4e7a4f2601e82714d1b1048a10614f41403 (patch) | |
tree | 899a5aff2a30d04eceb0a751c990d18f8aae3c1b /crawl-ref/source | |
parent | 748565171812099d39f456326a40e0691c89484c (diff) | |
download | crawl-ref-d93ab4e7a4f2601e82714d1b1048a10614f41403.tar.gz crawl-ref-d93ab4e7a4f2601e82714d1b1048a10614f41403.zip |
Fix [2482708]: When searching for equipment in a pile of items in
_equip_undead(), properly skip over corpses in the pile instead of going
into an infinite loop.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8139 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/spells3.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 1ee1097a86..ca3c85ca32 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -665,12 +665,8 @@ static void _equip_undead(const coord_def &a, int corps, int monster, item_def item(mitm[objl]); if (item.base_type == OBJ_CORPSES) - { first_obj = NON_ITEM; - continue; - } - - if (first_obj == NON_ITEM) + else if (first_obj == NON_ITEM) first_obj = objl; objl = item.link; |