X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=bfade6d09b52b4b89b1588d1483166ef1b898131;hp=76cc8e8d37d1caefdf0995955d6035e058932349;hb=52f55179a8d0b24f5410cdd9d29559e4f6408156;hpb=c039103b3177c481947053240b322fb8289240d8 diff --git a/src/search.cpp b/src/search.cpp index 76cc8e8d..bfade6d0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -394,7 +394,7 @@ namespace { } // Sort the PV lines searched so far and update the GUI - sort(RootMoves.begin(), RootMoves.begin() + PVIdx); + sort(RootMoves.begin(), RootMoves.begin() + PVIdx + 1); sync_cout << uci_pv(pos, depth, alpha, beta) << sync_endl; } @@ -1391,7 +1391,7 @@ split_point_start: // At split points actual search starts from here // Case 4: The destination square for m2 is defended by the moving piece in m1 p1 = pos.piece_on(t1); - if (pos.attacks_from(p1, t1) & t2) + if (pos.attacks_from(p1, t1, pos.pieces() ^ f2) & t2) return true; // Case 5: Discovered check, checking piece is the piece moved in m1