fix github issue #106 - polymorph panic
Fixes #106 If dipping a worn amulet into a potion of polymorph turns it into an amulet of change, the game panics while trying to use up that amulet when the new one hasn't replaced the old one in inventory yet. Simply reordering the relevant code isn't sufficient to fix things: once it is in inventory and can be successfully used up, later code would end up deferencing a stale pointer because it was unaware of the deletion.
This commit is contained in:
@@ -2830,6 +2830,7 @@ E int FDECL(wseg_at, (struct monst *, int, int));
|
||||
|
||||
E void FDECL(setworn, (struct obj *, long));
|
||||
E void FDECL(setnotworn, (struct obj *));
|
||||
E struct obj *FDECL(wearmask_to_obj, (long));
|
||||
E long FDECL(wearslot, (struct obj *));
|
||||
E void FDECL(mon_set_minvis, (struct monst *));
|
||||
E void FDECL(mon_adjust_speed, (struct monst *, int, struct obj *));
|
||||
|
||||
Reference in New Issue
Block a user