From: PatR Date: Sun, 7 Feb 2021 00:34:41 +0000 (-0800) Subject: potion dipping tweak X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb0588583f0a361c1e107d3ca3cdcc77ed78411a;p=nethack potion dipping tweak Update some code from four weeks ago. One of two hold_potion() calls was followed by update_inventory() but the other wasn't. Have hold_potion() do that itself. I'm not sure that this is needed and haven't convinced myself that it's not. --- diff --git a/src/potion.c b/src/potion.c index 167ccb2d5..e8cb131bd 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 potion.c $NHDT-Date: 1610410780 2021/01/12 00:19:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.190 $ */ +/* NetHack 3.7 potion.c $NHDT-Date: 1612658075 2021/02/07 00:34:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.193 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1901,6 +1901,7 @@ hold_potion(struct obj *potobj, const char *drop_fmt, const char *drop_arg, /* re-insert into inventory, possibly merging with compatible stack */ potobj = hold_another_object(potobj, drop_fmt, drop_arg, hold_msg); flags.pickup_burden = save_pickup_burden; + update_inventory(); return; } @@ -2301,7 +2302,6 @@ dodip(void) with compatible ones; override 'pickup_burden' while doing so */ hold_potion(singlepotion, "You juggle and drop %s!", doname(singlepotion), (const char *) 0); - update_inventory(); return 1; }