X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=1cacc1e3c538c719baedace424ccb61939cdf274;hp=5df175b233c8092a1f2c41ba66f3f0d4c7de6c64;hb=3984b8f8f0e1f53c737020c936f2a8372029545d;hpb=a016626825972d546d2e4ef6abd2e55f7bf2f3dc diff --git a/src/pawns.cpp b/src/pawns.cpp index 5df175b2..1cacc1e3 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -238,10 +238,10 @@ Score Entry::do_king_safety(const Position& pos) { evaluate_shelter(pos, ksq, shelter); // If we can castle use the bonus after the castling if it is bigger - if (pos.can_castle(Us | KING_SIDE)) + if (pos.can_castle(Us & KING_SIDE)) evaluate_shelter(pos, relative_square(Us, SQ_G1), shelter); - if (pos.can_castle(Us | QUEEN_SIDE)) + if (pos.can_castle(Us & QUEEN_SIDE)) evaluate_shelter(pos, relative_square(Us, SQ_C1), shelter); return shelter - make_score(0, 16 * minPawnDist);