From c4d3ca00ce7ee899d9a09c9832b2426c84767aed Mon Sep 17 00:00:00 2001 From: Mika Kuoppala Date: Wed, 13 Dec 2023 19:18:32 +0200 Subject: [PATCH] src/muse: Avoid touch_petrifies check if bad corpsenm EGGs can have non permanent monster based corpsenm assigned (-1). Before doing the touch_petrifies check, make sure that we have valid corpsenm. --- src/muse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/muse.c b/src/muse.c index 51273df38..4d381495b 100644 --- a/src/muse.c +++ b/src/muse.c @@ -2624,7 +2624,7 @@ searches_for_item(struct monst *mon, struct obj *obj) return (boolean) (mcould_eat_tin(mon) && (!resists_ston(mon) && cures_stoning(mon, obj, TRUE))); - if (typ == EGG) + if (typ == EGG && obj->corpsenm >= LOW_PM) return (boolean) touch_petrifies(&mons[obj->corpsenm]); break; default: