X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=c5af2f89524e5f9c04b89bb5c1780d8caa105911;hp=68984802e5193185aae5b3f648173563948bd94d;hb=12c0dfc11364f915d90032a3dfbac3ed8f39db0a;hpb=2d82db1d14631de38d158f16e31f374147bcfd6a diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 68984802..c5af2f89 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -821,7 +821,8 @@ 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) & pos.attacks_from(s)) + if ( (forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN)) // Unlikely + && (forward_bb(Them, s) & pos.pieces(Them, ROOK, QUEEN) & pos.attacks_from(s))) unsafeSquares = squaresToQueen; else unsafeSquares = squaresToQueen & (ei.attackedBy[Them][ALL_PIECES] | pos.pieces(Them));