fix #H6713 - unpaid_cost: object not on any bill
Stealing a shop object from outside the shop with a grappling hook
would result in that item being left marked 'unpaid' after the shop's
bill was treated as being bought and not yet paid for. This led to
"unpaid_cost: object wasn't on any bill" every time inventory was
examined. The problem was caused by handling the shop robbery after
removing the object from the floor but before adding it to inventory,
so it couldn't be found to have its unpaid bit cleared.
When investigating this I came across a more severe bug: if the hero
had never entered the shop, the shopkeeper's bill wasn't initialized
properly and add_one_tobill() could crash while attempting to execute
bp->bo_id = obj->o_id;
because 'bp' was Null.
This commit is contained in:
@@ -498,6 +498,11 @@ if a special level specified the appearance of a mimic and mimics had been
|
||||
genocided prior to creating the level, whatever random monster took
|
||||
the mimic's place got its intended appearance
|
||||
redundant "hit by gush of water" message if poly'd into iron golem or gremlin
|
||||
a shop object stolen from outside the shop (via grappling hook) would be left
|
||||
marked as 'unpaid' after the shop robbery took place, resulting in
|
||||
"unpaid_cost: object wasn't on any bill" when looking at inventory
|
||||
a shop object stolen from outside the shop could trigger a crash if that shop
|
||||
had never been entered by the hero
|
||||
|
||||
|
||||
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
|
||||
|
||||
Reference in New Issue
Block a user