pull request #1175 - obj->corpsenm fixes

Pull request by mkuoppal:  some objects which use the corpsenm field
to access the mons[] array can have a corpsenm value of NON_PM (-1)
and weren't avoiding array access in those cases.

In addition to a fixes entry for it, this makes some revisions to the
commited code, handling a few of the cases differently.

Closes #1175
This commit is contained in:
PatR
2024-01-06 15:13:31 -08:00
parent 4669676fc0
commit 83bdf71932
5 changed files with 34 additions and 40 deletions

View File

@@ -1348,6 +1348,7 @@ if polymorphing a potion turned it into oil, dipping potions produced oil
into non-oil kept its relative age (no noticeable effect though)
an engulfer capable of passing through iron bars could do so even when hero
was engulfed
some uses of mons[obj->corpsenm] weren't excluding obj->corpsenm==NON_PM (-1)
Fixes to 3.7.0-x General Problems Exposed Via git Repository