X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=bb9a2f97c0f5b7fddbe3c5aec66eb20e8aab332a;hp=8bbd0bff161b3917f6fae299f6f21fe7ff65d2af;hb=cbb1a8ed31679fe32d2694448a10b031390a32b3;hpb=a6c5f60caaa834dcc755aafb464c12f7f5d52567 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 8bbd0bff..bb9a2f97 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -823,7 +823,7 @@ Value do_evaluate(const Position& pos, Value& margin) { // If there is an enemy rook or queen attacking the pawn from behind, // add all X-ray attacks by the rook or queen. Otherwise consider only // the squares in the pawn's path attacked or occupied by the enemy. - if ( (forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN)) // Unlikely + if ( unlikely(forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN)) && (forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN) & pos.attacks_from(s))) unsafeSquares = squaresToQueen; else