From: nethack.allison Date: Sat, 23 Mar 2002 01:35:59 +0000 (+0000) Subject: #R650: Game crash (Panic - obj not free) X-Git-Tag: MOVE2GIT~2910 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fba4cbd6afee629b5138f9f96d2bef6126aa8d8f;p=nethack #R650: Game crash (Panic - obj not free) > > Oops! [...] > Suddenly, the dungeon collapses. > place_object: obj not free > > The crash is reproducible in wizmode by wishing for a landmine, arming it and > pushing a wished-for boulder onto it. --- diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 0a51e57bc..28ae8904d 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -2,6 +2,7 @@ $RCSfile$ $Revision$ $Date$ General Fixes and Modified Features ----------------------------------- +Prevent panic() obj_not_free when pushing a boulder over a landmine Platform- and/or Interface-Specific Fixes diff --git a/src/explode.c b/src/explode.c index 05173ac66..66a66d908 100644 --- a/src/explode.c +++ b/src/explode.c @@ -438,8 +438,9 @@ struct obj *obj; /* only scatter this obj */ && rn2(10)) { if (otmp->otyp == BOULDER) { pline("%s apart.", Tobjnam(otmp, "break")); - fracture_rock(otmp); - place_object(otmp, sx, sy); /* put fragments on floor */ + fracture_rock(otmp); /* the will place fragments on floor */ + obj_extract_self(otmp); + place_object(otmp, sx, sy); if ((otmp = sobj_at(BOULDER, sx, sy)) != 0) { /* another boulder here, restack it to the top */ obj_extract_self(otmp); diff --git a/src/weapon.c b/src/weapon.c index 1c94bd862..a40bcb8d9 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)weapon.c 3.4 2002/02/07 */ +/* SCCS Id: @(#)weapon.c 3.4 2002/03/22 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -871,7 +871,7 @@ enhance_weapon_skill() /* start with a legend if any entries will be annotated with "*" or "#" below */ if (eventually_advance > 0 || maxxed_cnt > 0) { - any.a_int = 0; + any.a_void = 0; if (eventually_advance > 0) { Sprintf(buf, "(Skill%s flagged by \"*\" may be enhanced %s.)",