X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovegen.cpp;h=2f7c55c8640bda0f93923c5b480241ac84471386;hb=3732c55c18fd74981370dc55b7b46ec8a05ad5bf;hp=5ed248933ce132b6ad820b6dc0ed0fb466266bfd;hpb=230fb6e9ad5b153aa84032ef0c7e60ff0db08416;p=stockfish diff --git a/src/movegen.cpp b/src/movegen.cpp index 5ed24893..2f7c55c8 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -93,10 +93,10 @@ namespace { // if the pawn is not on the same file as the enemy king, because we // don't generate captures. Note that a possible discovery check // promotion has been already generated amongst the captures. - Bitboard dcCandidates = pos.blockers_for_king(Them); - if (pawnsNotOn7 & dcCandidates) + Bitboard dcCandidateQuiets = pos.blockers_for_king(Them) & pawnsNotOn7; + if (dcCandidateQuiets) { - Bitboard dc1 = shift(pawnsNotOn7 & dcCandidates) & emptySquares & ~file_bb(ksq); + Bitboard dc1 = shift(dcCandidateQuiets) & emptySquares & ~file_bb(ksq); Bitboard dc2 = shift(dc1 & TRank3BB) & emptySquares; b1 |= dc1;