From a2a257a5125fc7c15dcd7047ba77ecc20ce2039e Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 8 Aug 2019 11:25:36 -0700 Subject: [PATCH] fix github issue #211 - wrong parentheses Fixes #211 dopickup() was getting the wrong value from pickup_checks() due to misplaced closing parenthesis. But it didn't actually impact play; picking things up from engulfer's minvent while swallowed worked even though the special check for that was failing. The code which was accidentally being skipped can probably go away but I haven't gone that far. --- src/hack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hack.c b/src/hack.c index 95e5ea06c..718eea8bf 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 hack.c $NHDT-Date: 1559664951 2019/06/04 16:15:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.213 $ */ +/* NetHack 3.6 hack.c $NHDT-Date: 1565288730 2019/08/08 18:25:30 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.215 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2641,9 +2641,9 @@ dopickup(VOID_ARGS) ? multi + 1 : 0; multi = 0; /* always reset */ - if ((ret = pickup_checks() >= 0)) + if ((ret = pickup_checks()) >= 0) { return ret; - else if (ret == -2) { + } else if (ret == -2) { tmpcount = -count; return loot_mon(u.ustuck, &tmpcount, (boolean *) 0); } /* else ret == -1 */ -- 2.49.0