From 4aac554b666b31e8934e335a50789c224acccc29 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 30 Oct 2015 20:54:45 +0200 Subject: [PATCH] Fix trying to look up curse state of deleted object --- src/muse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/muse.c b/src/muse.c index d774303e6..d16a8f212 100644 --- a/src/muse.c +++ b/src/muse.c @@ -1425,6 +1425,7 @@ struct monst *mtmp; /* don't use monster fields after killing it */ boolean confused = (mtmp->mconf ? TRUE : FALSE); int mmx = mtmp->mx, mmy = mtmp->my; + boolean is_cursed = otmp->cursed; mreadmsg(mtmp, otmp); /* Identify the scroll */ @@ -1457,8 +1458,8 @@ struct monst *mtmp; } m_useup(mtmp, otmp); /* Attack the player */ - if (distmin(mmx, mmy, u.ux, u.uy) == 1 && !otmp->cursed) { - drop_boulder_on_player(confused, !otmp->cursed, FALSE, TRUE); + if (distmin(mmx, mmy, u.ux, u.uy) == 1 && !is_cursed) { + drop_boulder_on_player(confused, !is_cursed, FALSE, TRUE); } return (mtmp->mhp <= 0) ? 1 : 2; -- 2.40.0