]> granicus.if.org Git - nethack/commit
fix github issue #106 - polymorph panic
authorPatR <rankin@nethack.org>
Sun, 17 Jun 2018 23:59:58 +0000 (16:59 -0700)
committerPatR <rankin@nethack.org>
Sun, 17 Jun 2018 23:59:58 +0000 (16:59 -0700)
commit4bce58f66560941a321b266181fee20859c8f928
tree8b87b2bd64fc95e53899434f8fffcfedec6e11fe
parent78fca9bef079f309d6a5f7bf5b9ffef52d28c0fa
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.
doc/fixes36.2
include/extern.h
src/potion.c
src/worn.c
src/zap.c