]> granicus.if.org Git - nethack/commit
fix github issue #769 - revive panic
authorPatR <rankin@nethack.org>
Fri, 10 Jun 2022 18:35:07 +0000 (11:35 -0700)
committerPatR <rankin@nethack.org>
Fri, 10 Jun 2022 18:35:07 +0000 (11:35 -0700)
commite2d694ed32959c7d3f8a36e03948fa64cb922532
tree3fee438381b4c3a12533a5e21019e3f52125fc8d
parent95dece1a2b628bf14f77a19297074c43889469ba
fix github issue #769 - revive panic

Issue #769, reported by k2 and diagnosed by entrez:  eating a troll
corpse that revives on the last turn of the meal was using up the
corpse while the revival was in progress (unless the hero couldn't
observe the resulting monster), leading to a panic when trying to
use it up at the end of revival.  Brought on by a recent change to
interrupt an occupied hero who can observe a hostile monster being
created nearby.

The fix isn't perfect.  If revival fails because there's no place
to put the revived troll, the meal will be interrupted with one bite
left instead of finishing.  If that happens, the interruption will
include a "you stop eating" message, just with no explanation why.
The partly eaten--almost completely eaten--corpse will remain.

Closes #769
doc/fixes3-7-0.txt
src/eat.c
src/zap.c