]> granicus.if.org Git - nethack/commitdiff
U295 - bones file creation cursing secondary weapon caused panic
authorcohrs <cohrs>
Sun, 2 Mar 2003 05:41:00 +0000 (05:41 +0000)
committercohrs <cohrs>
Sun, 2 Mar 2003 05:41:00 +0000 (05:41 +0000)
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
doc/fixes35.0
src/bones.c

index 22b4ac5c3a0f807010efd9bf82a70e12b02510ea..bea639d3e9dee612a24af48ff7bd1a424c0bce10 100644 (file)
@@ -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
index 78d3375f5eb606e325b33025007f74870c4a1a48..15f244766d2278ebe29ea0a6c854e6207c22a043 100644 (file)
@@ -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
index e4bd22837325a268f24c25c76e26ca89a678ed4e..827f52658ac38ae201d52a365b962123096e3f24 100644 (file)
@@ -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);