]> granicus.if.org Git - nethack/commitdiff
fix github issue #211 - wrong parentheses
authorPatR <rankin@nethack.org>
Thu, 8 Aug 2019 18:25:36 +0000 (11:25 -0700)
committerPatR <rankin@nethack.org>
Thu, 8 Aug 2019 18:25:36 +0000 (11:25 -0700)
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

index 95e5ea06c399cb240b90a6b69a4bba0574cbfc4a..718eea8bfa3f257c04d9cddaed5cd5ea492a3aef 100644 (file)
@@ -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 */