From: Marco Costalba Date: Sun, 19 Oct 2008 09:17:17 +0000 (+0100) Subject: Fix an assert due to a missing parentesis X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=00bcc6478737caae740dbf511d3587b9332ad2e6;ds=sidebyside Fix an assert due to a missing parentesis Bitwise operators precedence issue here, was causing an assert. This is a fallout from recent patches. Signed-off-by: Marco Costalba --- diff --git a/src/movegen.cpp b/src/movegen.cpp index d942d9c2..0646c230 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -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) {