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.
/* 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) {