X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=32b37413ae83f7ed1a2e39c22c80a1de45de602b;hp=ec4272a9e0f9bcb7ebf601515621e34be4e632ba;hb=a72c55283d132e64cad9101c65e59c1f9406be83;hpb=cf4df0327a3f30be345b0e9685b095be79e47cae diff --git a/src/search.cpp b/src/search.cpp index ec4272a9..32b37413 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1596,6 +1596,7 @@ namespace { // Don't search captures and checks with negative SEE values if ( !isCheck + && move != ttMove && !move_is_promotion(move) && pos.see_sign(move) < 0) continue; @@ -1622,7 +1623,7 @@ namespace { // All legal moves have been searched. A special case: If we're in check // and no legal moves were found, it is checkmate. - if (pos.is_check() && moveCount == 0) // Mate! + if (!moveCount && pos.is_check()) // Mate! return value_mated_in(ply); assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);