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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user