X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=f60411993fcc0877ed83a8a632f25945018aa9db;hp=d822ef4ef85e8387d7a206db3f85714646844ee2;hb=302e0f70c653bfcca4338d7be71dfdd1166da910;hpb=7756344d5d2b93970e7cd423f8cbf6fb1da11b74 diff --git a/src/pawns.cpp b/src/pawns.cpp index d822ef4e..f6041199 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -198,7 +198,7 @@ Score Entry::evaluate_shelter(const Position& pos, Square ksq) { b = theirPawns & file_bb(f); int theirRank = b ? relative_rank(Us, frontmost_sq(Them, b)) : 0; - int d = map_to_queenside(f); + int d = std::min(f, ~f); bonus += make_score(ShelterStrength[d][ourRank], 0); if (ourRank && (ourRank == theirRank - 1))