additonal oextra care

Be deliberately careful with copies taken of
oextra pointers and clear the pointer if it
truly is a redundant copy that will become
invalid if/when the original holder is deallocated.
This commit is contained in:
nethack.allison
2006-05-13 20:19:06 +00:00
parent 9151db8aaf
commit 1fcbfd85c9
6 changed files with 19 additions and 7 deletions

View File

@@ -2748,7 +2748,8 @@ domagictrap()
{ struct obj pseudo;
long save_conf = HConfusion;
pseudo = zeroobj; /* neither cursed nor blessed */
pseudo = zeroobj; /* neither cursed nor blessed,
and zero out oextra */
pseudo.otyp = SCR_REMOVE_CURSE;
HConfusion = 0L;
(void) seffects(&pseudo);