diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 61db532bd..8486a92d2 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -107,6 +107,8 @@ fix various places that "finally finished" could be displayed after the hero fix some cases where movement was disallowed but the hero was still conscious after destroying drawbridge, hero could appear to be in the wall sometimes shop items which hero is forced to buy could be sold back twice +non-empty container dropped but not sold in a tended shop and then picked up + after that shop became untended could be sold twice in another shop vision was not updated when polymorphing a statue into a boulder `I u' when carrying single unpaid item listed its cost twice armor which auto-curses when worn by hero should do same if worn by monster diff --git a/src/invent.c b/src/invent.c index 0f2ac6059..7692bcfae 100644 --- a/src/invent.c +++ b/src/invent.c @@ -299,8 +299,11 @@ struct obj *obj; if (obj->where != OBJ_FREE) panic("addinv: obj not free"); - obj->no_charge = 0; /* not meaningful for invent */ - obj->was_thrown = 0; /* ditto */ + /* normally addtobill() clears no_charge when items in a shop are + picked up, but won't do so if the shop has become untended */ + obj->no_charge = 0; /* should not be set in hero's invent */ + if (Has_contents(obj)) picked_container(obj); /* clear no_charge */ + obj->was_thrown = 0; /* not meaningful for invent */ addinv_core1(obj); #ifndef GOLDOBJ