]> granicus.if.org Git - nethack/commitdiff
trouble after applying a wielded cream pie
authornethack.allison <nethack.allison>
Fri, 29 Sep 2006 00:40:18 +0000 (00:40 +0000)
committernethack.allison <nethack.allison>
Fri, 29 Sep 2006 00:40:18 +0000 (00:40 +0000)
<Someone> wrote:
> I can' t find this bug in the known bug list. If I missed I do apologize.
> It occurs on the standard windows nethack.exe. Just wield a cream pie
> and then apply it. Press x to switch weapons. Program in disorder.
> s - 1752440940 glorkum 32 26485 101's named ? (alternate weapon; not wielded).
> Greetings, <Someone>

It crashed with an access violation for me.

doc/fixes34.4
src/apply.c

index 381150816faa6b9f8e7bb087401a1ddcff2de944..0362fc007c958740b132ad981d9a66b05fc9f711 100644 (file)
@@ -261,6 +261,7 @@ try to keep migrating monsters from escaping the wizard tower
 affected monsters should always respect "Elbereth"
 try harder to keep dragged chain between ball and hero
 fireproof containers should not burn in lava
+fix invalid pointer dereference after applying a wielded cream pie
 
 
 Platform- and/or Interface-Specific Fixes
index d797f6dfdd337e32f993e130da105b25cf956c36..bbe57d5a60f8ee4b3201e3697e1c936847936327 100644 (file)
@@ -2599,6 +2599,8 @@ struct obj *obj;
                        You_cant("see through all the sticky goop on your %s.",
                                body_part(FACE));
        }
+
+       setnotworn(obj);
        /* useup() is appropriate, but we want costly_alteration()'s message */
        costly_alteration(obj, COST_SPLAT);
        obj_extract_self(obj);