X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fendgame.cpp;h=3e01259c9745b01d90c0e9731f5bf2a6727fdf20;hb=1e9397a2df3094589540838b4e24342ac53c212a;hp=db67ce95cf92923b012cfeb31b3ef28560f16771;hpb=d9cac9a41492c3e54f3bb471606ec3a922a8ea0f;p=stockfish diff --git a/src/endgame.cpp b/src/endgame.cpp index db67ce95..3e01259c 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -214,7 +214,7 @@ Value Endgame::operator()(const Position& pos) const { Value result; // If the stronger side's king is in front of the pawn, it's a win - if (wksq < psq && file_of(wksq) == file_of(psq)) + if (forward_file_bb(WHITE, wksq) & psq) result = RookValueEg - distance(wksq, psq); // If the weaker side's king is too far from the pawn and the rook,