commit 2b191bf4b58cae1e4a8da7f6e24954438fae8fc5
Author: Yann Dirson <ydirson@altern.org>
Date:   Fri Jan 18 00:19:24 2008 +0100

    Fix integer overflow caused by bad use of binary operator.
    
    Guess this may make the AI more accurate :)
    
    Problem caught by gcc:
    
    ../../gnushogi/search.c: In function 'search':
    ../../gnushogi/search.c:887: warning: overflow in implicit constant conversion
    
    
    A quick audit only revealed a place where another logical AND was
    tested using a curious idiom, so let's make it consistent at the same
    time.

diff --git a/gnushogi/eval.c b/gnushogi/eval.c
index 15509e2..a8a54c7 100644
--- a/gnushogi/eval.c
+++ b/gnushogi/eval.c
@@ -1005,7 +1005,7 @@ BRLscan(short sq, short *mob)
 { \
     if (color[u] != c2) \
     { \
-        if ((atk1[u] == 0) || ((atk2[u] & CNT_MASK) > 1)) \
+        if ((atk1[u] == 0) || ((atk2[u] & CNT_MASK) != 0)) \
         { \
             ++cnt; \
         } \
diff --git a/gnushogi/search.c b/gnushogi/search.c
index 3d49b8b..72d3219 100644
--- a/gnushogi/search.c
+++ b/gnushogi/search.c
@@ -884,7 +884,7 @@ search(short side,
 
             MakeMove(side, node, &tempb, &tempc, &tempsf,
                      &tempst, &INCscore);
-            CptrFlag[ply] = (node->flags & capture);
+            CptrFlag[ply] = ((node->flags & capture) != 0);
             TesujiFlag[ply] = (node->flags & tesuji)
                 && (node->flags & dropmask);
             Tscore[ply] = node->score;
