Fix an assert due to a missing parentesis
authorMarco Costalba <mcostalba@gmail.com>
Sun, 19 Oct 2008 09:17:17 +0000 (10:17 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 20 Oct 2008 19:47:15 +0000 (21:47 +0200)
Bitwise operators precedence issue here, was
causing an assert.

This is a fallout from recent patches.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/movegen.cpp

index d942d9c290c47abc77f90b770f49f4cc56fc7162..0646c230f50c778360a48c368258d47998df2e68 100644 (file)
@@ -252,10 +252,9 @@ int generate_evasions(const Position& pos, MoveStack* mlist) {
       }
 
       // Pieces captures
-      b1 =  (pos.knight_attacks(checksq) & pos.knights(us))
-          | (pos.bishop_attacks(checksq) & pos.bishops_and_queens(us))
-          | (pos.rook_attacks(checksq)   & pos.rooks_and_queens(us))
-          & not_pinned;
+      b1 = (  (pos.knight_attacks(checksq) & pos.knights(us))
+            | (pos.bishop_attacks(checksq) & pos.bishops_and_queens(us))
+            | (pos.rook_attacks(checksq)   & pos.rooks_and_queens(us)) ) & not_pinned;
 
       while (b1)
       {