]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix an assert when we stop the search
[stockfish] / src / search.cpp
index b43ebd02ab848ae4f2675bd0eaba637b8f9532b8..4ac944029fa8d1b02bf2086b545560e8b79808e2 100644 (file)
@@ -958,7 +958,7 @@ split_point_start: // At split points actual search starts from here
       // ran out of time. In this case, the return value of the search cannot
       // be trusted, and we don't update the best move and/or PV.
       if (Signals.stop || thisThread->cutoff_occurred())
-          return bestValue;
+          return value; // To avoid returning VALUE_INFINITE
 
       if (RootNode)
       {