X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovegen.cpp;h=a254590b1286fa8aa02a529d915c377f90c9efe1;hp=1524bf1f2453baa1152e9c95874209c91184d04c;hb=555d9a8711673fd669be03017f92972f5bc4e839;hpb=b9768b8bc5ec9e814faedccf557d0304997d8aaf diff --git a/src/movegen.cpp b/src/movegen.cpp index 1524bf1f..a254590b 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -56,7 +56,7 @@ namespace { // Because we generate only legal castling moves we need to verify that // when moving the castling rook we do not discover some hidden checker. // For instance an enemy queen in SQ_A1 when castling rook is in SQ_B1. - if (Chess960 && (pos.attackers_to(kto, pos.pieces() ^ rfrom) & enemies)) + if (Chess960 && (attacks_bb(kto, pos.pieces() ^ rfrom) & pos.pieces(~us, ROOK, QUEEN))) return mlist; (mlist++)->move = make(kfrom, rfrom);