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().
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user