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:
@@ -403,6 +403,7 @@ display_monster(x, y, mon, sightflags, worm_tail)
|
||||
case M_AP_OBJECT: {
|
||||
struct obj obj; /* Make a fake object to send */
|
||||
/* to map_object(). */
|
||||
obj.oextra = (struct oextra *)0;
|
||||
obj.ox = x;
|
||||
obj.oy = y;
|
||||
obj.otyp = mon->mappearance;
|
||||
|
||||
Reference in New Issue
Block a user