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.
This commit is contained in:
cohrs
2002-05-14 07:02:50 +00:00
parent 0d0f8b5c70
commit b131f0fee6
2 changed files with 2 additions and 0 deletions

View 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

View File

@@ -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 */