From: nethack.allison Date: Fri, 29 Sep 2006 00:40:18 +0000 (+0000) Subject: trouble after applying a wielded cream pie X-Git-Tag: MOVE2GIT~872 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15d933a07fc9ca2c2088752f92b5b3352f6a8b13;p=nethack trouble after applying a wielded cream pie 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, It crashed with an access violation for me. --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 381150816..0362fc007 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 diff --git a/src/apply.c b/src/apply.c index d797f6dfd..bbe57d5a6 100644 --- a/src/apply.c +++ b/src/apply.c @@ -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);