Fix another out-of-bounds error
Monster trying to decide if a tin could cure stoning looking at a special or empty tin would do acidic(&mons[-1])
This commit is contained in:
@@ -23,6 +23,7 @@ change crysknife from mineral to bone and worm tooth from unspecified to bone
|
||||
worn meat ring shouldn't cause increased hunger; neither should fake Amulet
|
||||
worn +0 ring of protection should cause increased hunger if it is the only
|
||||
source of extrinsic Protection
|
||||
fix accessing mons[-1] when monster figures out if a tin cures stoning
|
||||
|
||||
|
||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||
|
||||
@@ -2313,6 +2313,8 @@ boolean tinok;
|
||||
if (obj->otyp != CORPSE && (obj->otyp != TIN || !tinok))
|
||||
return FALSE;
|
||||
/* corpse, or tin that mon can open */
|
||||
if (obj->corpsenm == NON_PM) /* empty/special tin */
|
||||
return FALSE;
|
||||
return (boolean) (obj->corpsenm == PM_LIZARD
|
||||
|| (acidic(&mons[obj->corpsenm])
|
||||
&& (obj->corpsenm != PM_GREEN_SLIME
|
||||
|
||||
Reference in New Issue
Block a user