From a9a7ffe18f53c11d8e6182c9f23b7f12cc0d6cfa Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 2 Mar 2003 05:41:00 +0000 Subject: [PATCH] U295 - bones file creation cursing secondary weapon caused panic As reported, if you're twoweaponing and die, your secondary weapon may become cursed and drop. But, the bones file code is dropping everything and tries to drop it again, causing a panic. drop_upon_death just clears things out, so follow suit for uswapwep. --- doc/fixes34.2 | 1 + doc/fixes35.0 | 1 + src/bones.c | 1 + 3 files changed, 3 insertions(+) diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 22b4ac5c3..bea639d3e 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -2,6 +2,7 @@ $RCSfile$ $Revision$ $Date$ General Fixes and Modified Features ----------------------------------- +avoid panic when secondary weapon is cursed while generating bones level Platform- and/or Interface-Specific Fixes diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 78d3375f5..15f244766 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -3,6 +3,7 @@ $RCSfile$ $Revision$ $Date$ General Fixes and Modified Features ----------------------------------- setmangry should not be called when a monster enters a bones region +avoid panic when secondary weapon is cursed while generating bones level Platform- and/or Interface-Specific Fixes diff --git a/src/bones.c b/src/bones.c index e4bd22837..827f52658 100644 --- a/src/bones.c +++ b/src/bones.c @@ -124,6 +124,7 @@ struct obj *cont; { struct obj *otmp; + uswapwep = 0; /* ensure curse() won't cause swapwep to drop twice */ while ((otmp = invent) != 0) { obj_extract_self(otmp); obj_no_longer_held(otmp); -- 2.40.0