From 5c053b12ddfb5b4b132de93ac47f45edb88f75c0 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Fri, 21 Mar 2008 03:09:37 +0000 Subject: [PATCH] post-3.4.3 obj not free panic Throwing an object while engulfed and then quitting triggers a panic when the end-of-game code tries to clean up the thrown object. Throwing code wasn't reflecting the fact that adding the missile to the engulfer's inventory already handles the thrown object. 3.4.3 wasn't affected; it didn't bother trying to clean up `thrownobj' in done(). --- src/dothrow.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/dothrow.c b/src/dothrow.c index 22936809e..884373a01 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)dothrow.c 3.5 2007/12/03 */ +/* SCCS Id: @(#)dothrow.c 3.5 2008/03/20 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1090,7 +1090,10 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ ; /* missile has already been handled */ } else if (u.uswallow) { /* ball is not picked up by monster */ - if (obj != uball) (void) mpickobj(u.ustuck,obj); + if (obj != uball) { + (void) mpickobj(u.ustuck, obj); + thrownobj = (struct obj *)0; + } } else { /* the code following might become part of dropy() */ if (obj->oartifact == ART_MJOLLNIR &&