X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=64cdb325ebce53c3a785747767cf76109b5daa31;hb=1e586288ca4a0ae567c8d9b9b77e804f25fe6719;hp=1d8139c41d8c764e974616ed5b54c8ee6cb3df34;hpb=eccccba0ce4e2d627cbe2adb1bf4a692d595ca99;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 1d8139c4..64cdb325 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -919,7 +919,6 @@ moves_loop: // When in check search starts from here // Step 13. Pruning at shallow depth if ( !rootNode - && !inCheck && bestValue > VALUE_MATED_IN_MAX_PLY) { if ( !captureOrPromotion @@ -1121,6 +1120,9 @@ moves_loop: // When in check search starts from here // All legal moves have been searched and if there are no legal moves, it // must be a mate or a stalemate. If we are in a singular extension search then // return a fail low score. + + assert(moveCount || !inCheck || excludedMove || !MoveList(pos).size()); + if (!moveCount) bestValue = excludedMove ? alpha : inCheck ? mated_in(ss->ply) : DrawValue[pos.side_to_move()];