From 63908bbed43ed6506fc8d2fe5fbb7483976754f0 Mon Sep 17 00:00:00 2001 From: cohrs Date: Mon, 25 Feb 2002 05:51:44 +0000 Subject: [PATCH] 'D'ropping gold messes up inventory - new splitobj() behavior requires special casing when !GOLDOBJ and dropping some of your gold, to ensure that the remainder remains the first item in the inventory --- src/do.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/do.c b/src/do.c index ff8fabfb6..75c96c3dc 100644 --- a/src/do.c +++ b/src/do.c @@ -671,6 +671,11 @@ int retry; cnt = pick_list[i].count; if (cnt < otmp->quan && !welded(otmp) && (!otmp->cursed || otmp->otyp != LOADSTONE)) { +#ifndef GOLDOBJ + if (otmp->oclass == GOLD_CLASS) + (void) splitobj(otmp, otmp->quan - cnt); + else +#endif otmp = splitobj(otmp, cnt); } n_dropped += drop(otmp);