]> granicus.if.org Git - nethack/commitdiff
R870 - shopkeeper grabbing backpack panic fix
authorcohrs <cohrs>
Tue, 14 May 2002 07:02:50 +0000 (07:02 +0000)
committercohrs <cohrs>
Tue, 14 May 2002 07:02:50 +0000 (07:02 +0000)
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.

doc/fixes34.1
src/shk.c

index ebb8e005cd72087c049791952dfe48c007800db7..c5f5882207a5ff2853af6cae981d75077680655b 100644 (file)
@@ -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
index e3ec83d5d24779bdf38efc90abdc4052303e1d6d..69ae12a357d79f0e75b5ff96b982f46a7362f982 100644 (file)
--- 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 */