From 15d933a07fc9ca2c2088752f92b5b3352f6a8b13 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Fri, 29 Sep 2006 00:40:18 +0000 Subject: [PATCH] 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. --- doc/fixes34.4 | 1 + src/apply.c | 2 ++ 2 files changed, 3 insertions(+) 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); -- 2.50.1