X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;fp=src%2Fposition.cpp;h=5efd9c42a5eb351df1c043ea0b1e25a84b28f935;hp=de9722fff2b9a098d1fcf5c1cb98a011f878d4df;hb=0c878adb36c1013944231083d6a7b3b53aa1ad7e;hpb=ddd4224640e04463c62b5896660f6f6abe4cc1a5 diff --git a/src/position.cpp b/src/position.cpp index de9722ff..5efd9c42 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -633,11 +633,11 @@ bool Position::gives_check(Move m) const { Square to = to_sq(m); // Is there a direct check? - if (st->checkSquares[type_of(piece_on(from))] & to) + if (check_squares(type_of(piece_on(from))) & to) return true; // Is there a discovered check? - if ( (st->blockersForKing[~sideToMove] & from) + if ( (blockers_for_king(~sideToMove) & from) && !aligned(from, to, square(~sideToMove))) return true;