From: cohrs Date: Tue, 14 May 2002 07:02:50 +0000 (+0000) Subject: R870 - shopkeeper grabbing backpack panic fix X-Git-Tag: MOVE2GIT~2745 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b131f0fee664b2dc30c98456000531ebc66bf5b2;p=nethack R870 - shopkeeper grabbing backpack panic fix The worn bits, et al, were not all cleared when the shopkeeper grabbed your pack. This currently affects only alternate (non-twoweap) and quivered objects. This could lead to a panic or a crash. --- diff --git a/doc/fixes34.1 b/doc/fixes34.1 index ebb8e005c..c5f588220 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -101,6 +101,7 @@ fix fountain noises on some special levels (castle, valk home, various mines) disallow mounting a trapped steed to avoid inappropriate trap effects #chat with meditating monster will rouse it suppress redundant message when stoning effect transforms a golem +clear worn bits of any object grabbed by shopkeeper to avoid extract_nobj panic Platform- and/or Interface-Specific Fixes diff --git a/src/shk.c b/src/shk.c index e3ec83d5d..69ae12a35 100644 --- a/src/shk.c +++ b/src/shk.c @@ -3369,6 +3369,7 @@ register int fall; if ((obj->owornmask & ~(W_SWAPWEP|W_QUIVER)) != 0 || (obj == uswapwep && u.twoweap) || (obj->otyp == LEASH && obj->leashmon)) continue; + setnotworn(obj); freeinv(obj); subfrombill(obj, shkp); (void) add_to_minv(shkp, obj); /* may free obj */