diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2010-03-17 11:10:54 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2010-03-17 11:55:46 +0100 |
commit | 3ec0fb9383c55ae72df179e9ffaf35673c4920a7 (patch) | |
tree | cf308889b2f2fd22f5f43ac1b890fc9db3abc397 /crawl-ref/source/mon-clone.cc | |
parent | eee2a1418045006b132907a3981166df04ac1529 (diff) | |
download | crawl-ref-3ec0fb9383c55ae72df179e9ffaf35673c4920a7.tar.gz crawl-ref-3ec0fb9383c55ae72df179e9ffaf35673c4920a7.zip |
Fix mons_summon_illusion_from use of create_monster.
It was checking the return value against NON_MONSTER instead of -1,
so a failed summon illusion would cause it to overwrite the end of
env.items, likely leading to issue #1089. In debug builds, this
triggered an assertion.
Fixes issue #1089.
Diffstat (limited to 'crawl-ref/source/mon-clone.cc')
-rw-r--r-- | crawl-ref/source/mon-clone.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-clone.cc b/crawl-ref/source/mon-clone.cc index f1de1b9b77..c13b117624 100644 --- a/crawl-ref/source/mon-clone.cc +++ b/crawl-ref/source/mon-clone.cc @@ -202,7 +202,7 @@ void mons_summon_illusion_from(monsters *monster, actor *foe, create_monster( mgen_data(MONS_PLAYER_GHOST, SAME_ATTITUDE(monster), monster, 6, spell_cast, monster->pos(), monster->foe, 0)); - if (midx != NON_MONSTER) + if (midx != -1) { mpr("There is a horrible, sudden wrenching feeling in your soul!", MSGCH_WARN); |