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.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user