src/eat: Check for valid corpsenm before checking is_rider
corpsenm can be -1 so limit checking is_rider with only >= LOW_PM corpse numbers.
This commit is contained in:
@@ -57,7 +57,8 @@ static int tin_ok(struct obj *);
|
|||||||
they can be sacrificed regardless of age which implies that they never
|
they can be sacrificed regardless of age which implies that they never
|
||||||
become rotten */
|
become rotten */
|
||||||
#define nonrotting_corpse(mnum) \
|
#define nonrotting_corpse(mnum) \
|
||||||
((mnum) == PM_LIZARD || (mnum) == PM_LICHEN || is_rider(&mons[mnum]) \
|
((mnum) == PM_LIZARD || (mnum) == PM_LICHEN \
|
||||||
|
|| ((mnum) >= LOW_PM && is_rider(&mons[mnum])) \
|
||||||
|| (mnum) == PM_ACID_BLOB)
|
|| (mnum) == PM_ACID_BLOB)
|
||||||
|
|
||||||
/* non-rotting non-corpses; unlike lizard corpses, these items will behave
|
/* non-rotting non-corpses; unlike lizard corpses, these items will behave
|
||||||
|
|||||||
Reference in New Issue
Block a user