]> granicus.if.org Git - nethack/commitdiff
Fix & instead of && in onbill()
authorTung Nguyen <tungtn3@gmail.com>
Tue, 8 Mar 2016 13:26:57 +0000 (00:26 +1100)
committerTung Nguyen <tungtn3@gmail.com>
Fri, 11 Mar 2016 07:35:56 +0000 (18:35 +1100)
It's obviously supposed to be the latter and not the former.

Interesting note: This same bug was found and fixed in NitroHack commit
4973ce4 (static checker day: fixes for scan-build and PVS warnings).

src/shk.c

index 6cf62f2c0ea910328f40d766ebea5949aaf87f47..addf8aac7ae1148ed5efd0adb15443be06bb90fd 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -859,7 +859,7 @@ boolean silent;
             } else
                 bp++;
     }
-    if (obj->unpaid & !silent)
+    if (obj->unpaid && !silent)
         pline("onbill: unpaid obj not on bill?");
     return (struct bill_x *) 0;
 }