[gnome-games] gnect: logic AND should have been bitwise AND



commit 2ab72cf13a496c9ebb1980ae863f6fa7b0e19d03
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date:   Sat Oct 24 01:47:40 2009 +0200

    gnect: logic AND should have been bitwise AND

 gnect/src/heurist.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnect/src/heurist.c b/gnect/src/heurist.c
index 4fd7b85..5d0c03f 100644
--- a/gnect/src/heurist.c
+++ b/gnect/src/heurist.c
@@ -565,8 +565,8 @@ heuristic_play_best (struct board *board, long maxnodenum)
       (unsigned char) (board->stack[BOARDX - 1 - x] & 0xff);
   }
 
-  rootnode->stack[BOARDX] = (unsigned char) (board->stack[BOARDX] && 0xff);
-  symmetric->stack[BOARDX] = (unsigned char) (board->stack[BOARDX] && 0xff);
+  rootnode->stack[BOARDX] = (unsigned char) (board->stack[BOARDX] & 0xff);
+  symmetric->stack[BOARDX] = (unsigned char) (board->stack[BOARDX] & 0xff);
 
   if (bin_compare (symmetric->square, rootnode->square) > 0) {
     free (rootnode);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]