diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-10-27 19:02:39 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-10-27 19:07:26 +0100 |
commit | eca39fc5a55871d1368cda386660bb3c51680df3 (patch) | |
tree | 2d3cfcb7dd94a4b4548962b6e9d401b82832e939 /crawl-ref/source/monster.h | |
parent | 0052189f9e56708f4236a36a7a05e2472661c85d (diff) | |
download | crawl-ref-eca39fc5a55871d1368cda386660bb3c51680df3.tar.gz crawl-ref-eca39fc5a55871d1368cda386660bb3c51680df3.zip |
Fix an use-after-free crash.
When doing bad things to a monster from within an enchantment, sometimes the
enchantment goes away -- most often together with the monster's life. Trying
to decay it at that moment is unwise.
Diffstat (limited to 'crawl-ref/source/monster.h')
-rw-r--r-- | crawl-ref/source/monster.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index d8fc49b953..d43d1601ed 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -517,7 +517,7 @@ private: void id_if_worn(mon_inv_type mslot, object_class_type base_type, int sub_type) const; - bool decay_enchantment(const mon_enchant &me, bool decay_degree = true); + bool decay_enchantment(enchant_type en, bool decay_degree = true); bool wants_weapon(const item_def &item) const; bool wants_armour(const item_def &item) const; |