summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-18 15:08:40 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-18 15:08:40 +0000
commit4f56baa35df811304ef3e45c83471fcfd43bce2c (patch)
tree32443c8d02e82c16a5e8f1153e3ce194e9b8f02b /crawl-ref/source/misc.cc
parent92a70a7bda3d5a52fd6cc016b748e6bf59fb81e4 (diff)
downloadcrawl-ref-4f56baa35df811304ef3e45c83471fcfd43bce2c.tar.gz
crawl-ref-4f56baa35df811304ef3e45c83471fcfd43bce2c.zip
[2758242] Fixing segfault during debug_mons_scan due to an mprf not matching its format string with its var args. Also, fixing clone function from chaos brand that was causing this where cloned items in monster inventories weren't setting their link to be part of the new monster's inventory. Refactoring monster holding functions into item_def, where they probably should be.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9618 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 488babbb43..72edbf9402 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -302,7 +302,7 @@ void maybe_coagulate_blood_potions_floor(int obj)
// Coagulated blood cannot coagulate any further...
ASSERT(blood.sub_type == POT_BLOOD);
- if (!held_by_monster(blood))
+ if (!blood.held_by_monster())
{
// Now that coagulating is necessary, check square for
// !coagulated blood.
@@ -392,8 +392,8 @@ void maybe_coagulate_blood_potions_floor(int obj)
ASSERT(timer_new.size() == coag_count);
props_new.assert_validity();
- if (held_by_monster(blood))
- move_item_to_grid(&o, holding_monster(blood)->pos());
+ if (blood.held_by_monster())
+ move_item_to_grid(&o, blood.holding_monster()->pos());
else
move_item_to_grid(&o, blood.pos);