summaryrefslogtreecommitdiffstats
path: root/backgammon
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-03-22 04:22:05 +0000
committerchristos <christos@NetBSD.org>2006-03-22 04:22:05 +0000
commit436926c776eafbaf1048461eda1ef27219e39e1e (patch)
tree8264b61bb7f2ce1ecca51ca3e21b0d7fa65e1991 /backgammon
parent0cef9d971643acfb2c83647f5f5903c96d774d97 (diff)
downloadbsdgames-darwin-436926c776eafbaf1048461eda1ef27219e39e1e.tar.gz
bsdgames-darwin-436926c776eafbaf1048461eda1ef27219e39e1e.tar.zst
bsdgames-darwin-436926c776eafbaf1048461eda1ef27219e39e1e.zip
Coverity CID 558: && should be obviously ||
Diffstat (limited to 'backgammon')
-rw-r--r--backgammon/common_source/odds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/backgammon/common_source/odds.c b/backgammon/common_source/odds.c
index 0d875848..fe91e00c 100644
--- a/backgammon/common_source/odds.c
+++ b/backgammon/common_source/odds.c
@@ -1,4 +1,4 @@
-/* $NetBSD: odds.c,v 1.6 2005/07/01 01:12:39 jmc Exp $ */
+/* $NetBSD: odds.c,v 1.7 2006/03/22 04:22:05 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)odds.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: odds.c,v 1.6 2005/07/01 01:12:39 jmc Exp $");
+__RCSID("$NetBSD: odds.c,v 1.7 2006/03/22 04:22:05 christos Exp $");
#endif
#endif /* not lint */
@@ -99,7 +99,7 @@ canhit(int i, int c)
if (board[j] * a > 0) {
diff = abs(j - i);
addon = place + ((board[j] * a > 2 || j == b) ? 5 : 0);
- if ((j == b && menstuck == 1) &&
+ if ((j == b && menstuck == 1) ||
(j != b && menstuck == 0))
for (k = 1; k < diff; k++)
if (k < 7 && diff - k < 7 &&