]> granicus.if.org Git - nethack/commit
fix suicidal panic
authornethack.rankin <nethack.rankin>
Mon, 3 Dec 2007 21:13:58 +0000 (21:13 +0000)
committernethack.rankin <nethack.rankin>
Mon, 3 Dec 2007 21:13:58 +0000 (21:13 +0000)
commit3e42f762445a56df1c23459c31cec67d80271064
tree6e9f7b3bcc4750caa5421e00700fae1c2de08ef1
parent19d9b34374d2ffd58d0f6c663a3caf3a298e0d28
fix suicidal panic

     Some post-3.4.3 code in done() cleans up thrownobj and kickobj to
plug a potential memory leak (unnoticeable one since the game is over),
but they have to be free objects rather than on any list.  toss_up() was
leaving thrownobj defined after putting the thrown object on the floor,
leading to "obj not free" panic from dealloc_obj() if threw you an object
upward and it dealt fatal damage when it fell back down.  (For non-fatal
damage, toss_up()'s caller cleaned things up later.)
src/dothrow.c