From: Pasi Kallinen Date: Sat, 14 Nov 2015 15:41:27 +0000 (+0200) Subject: Extract guard gold before disposing it X-Git-Tag: NetHack-3.6.0_RC01~54^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9eb14f684c0fb9a44343cb49a3ab6afdfeb615a2;p=nethack Extract guard gold before disposing it If the gold is still in monster inventory, dealloc_obj will panic. --- diff --git a/src/steal.c b/src/steal.c index 94fcaca2e..4b5378d96 100644 --- a/src/steal.c +++ b/src/steal.c @@ -676,6 +676,7 @@ boolean is_pet; /* If true, pet should keep wielded/worn items */ if (canspotmon(mtmp)) pline("%s gold %s.", s_suffix(Monnam(mtmp)), canseemon(mtmp) ? "vanishes" : "seems to vanish"); + obj_extract_self(otmp); obfree(otmp, (struct obj *) 0); } /* isgd && has gold */