some special code

was added, specific to menustyle:combination in
menu_drop(), which short-circuited a redundant
prompt that <Someone> had complained about by returning
immediately if a special code came back from
ggetobj() in ggoresults.

The top of menu_drop, however, had created a
u_gold object and inserted it into the invent
chain, so you can't just return.  You have
to use a "goto" to get to drop_done, so that
the object is cleaned up.
This commit is contained in:
nethack.allison
2002-01-26 04:06:26 +00:00
parent 02a39530ab
commit 5482d1ab74

View File

@@ -659,8 +659,10 @@ int retry;
/* Gather valid classes via traditional NetHack method */
i = ggetobj("drop", drop, 0, TRUE, &ggoresults);
if (i == -2) all_categories = TRUE;
if (ggoresults & ALL_FINISHED)
return i;
if (ggoresults & ALL_FINISHED) {
n_dropped = i;
goto drop_done;
}
}
if (drop_everything) {