water vs acid
Fix the bug From a bug report.alt.org server, where killing a monster by closing the castle drawbridge resulted in a panic after the dead monster's possessions were dropped into the moat and a potion of acid exploded in the process. water_damage() deleted the object but had no way to tell flooreffects() that it was gone, so flooreffects() couldn't tell its own caller not to place and stack the object. After that, a chunk of freed memory became part of the floor objects chain and eventually triggered a panic which tried to make a save file but whose reason didn't get logged properly.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)extern.h 3.5 2004/06/12 */
|
||||
/* SCCS Id: @(#)extern.h 3.5 2006/05/08 */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2173,7 +2173,7 @@ E void FDECL(fill_pit, (int,int));
|
||||
E int FDECL(float_down, (long, long));
|
||||
E void NDECL(climb_pit);
|
||||
E int FDECL(fire_damage, (struct obj *,BOOLEAN_P,BOOLEAN_P,XCHAR_P,XCHAR_P));
|
||||
E void FDECL(water_damage, (struct obj *,BOOLEAN_P,BOOLEAN_P));
|
||||
E void FDECL(water_damage, (struct obj **,BOOLEAN_P,BOOLEAN_P));
|
||||
E boolean NDECL(drown);
|
||||
E void FDECL(drain_en, (int));
|
||||
E int NDECL(dountrap);
|
||||
|
||||
Reference in New Issue
Block a user