]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix a minor bug in search
[stockfish] / src / search.cpp
index 4139ef96b707afa81baec5e5d19a7fbf2d7a28c9..cf98ca35af3878dbfd5043da2446970236c1157f 100644 (file)
@@ -826,7 +826,8 @@ split_point_start: // At split points actual search starts from here
           && !inCheck
           && !dangerous
           &&  move != ttMove
           && !inCheck
           && !dangerous
           &&  move != ttMove
-          && (bestValue > VALUE_MATED_IN_MAX_PLY || bestValue == -VALUE_INFINITE))
+          && (bestValue > VALUE_MATED_IN_MAX_PLY || (   bestValue == -VALUE_INFINITE
+                                                     && alpha > VALUE_MATED_IN_MAX_PLY)))
       {
           // Move count based pruning
           if (   depth < 16 * ONE_PLY
       {
           // Move count based pruning
           if (   depth < 16 * ONE_PLY