From: PatR Date: Fri, 29 Apr 2016 08:43:03 +0000 (-0700) Subject: container simplification bit X-Git-Tag: NetHack-3.6.1_RC01~804 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8bea47e8b2fe5c656b940cd123c2f8af50e89e63;p=nethack container simplification bit Make use of the unsplitobj routine added last Fall, --- diff --git a/src/pickup.c b/src/pickup.c index bbb0ec17b..966f91f69 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pickup.c $NHDT-Date: 1457400916 2016/03/08 01:35:16 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.171 $ */ +/* NetHack 3.6 pickup.c $NHDT-Date: 1461919368 2016/04/29 08:42:48 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.177 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2487,11 +2487,7 @@ boolean more_containers; /* True iff #loot multiple and this isn't last one */ } else { /* couldn't put selected item into container for some reason; might need to undo splitobj() */ - for (curr = invent; curr; curr = curr->nobj) - if (curr->nobj == otmp) - break; - if (curr && curr->invlet == otmp->invlet) - (void) merged(&curr, &otmp); + (void) unsplitobj(otmp); } } }