]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix bogus mate scores in some positions
[stockfish] / src / search.cpp
index 7a06dad93f94035b046c9384938ce6d8d0b983b1..6dcd9f1db794f56f1ab5214e21fcab7587d2b3b0 100644 (file)
@@ -856,7 +856,8 @@ split_point_start: // At split points actual search starts from here
           && !captureOrPromotion
           && !inCheck
           && !dangerous
-          &&  move != ttMove)
+          &&  move != ttMove
+          &&  bestValue > VALUE_MATED_IN_MAX_PLY)
       {
           // Move count based pruning
           if (   depth < 16 * ONE_PLY