[gnome-games] gnect: logic AND should have been bitwise AND
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games] gnect: logic AND should have been bitwise AND
- Date: Fri, 23 Oct 2009 23:48:19 +0000 (UTC)
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]