]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Partial revert of "Assorted trivial cleanups 5/2019".
[stockfish] / src / search.cpp
index d9543899a0f7844e2b817b3e2095f321a8ca51fc..047a08925a35bbd2650f1cb40b43d75cdbe377f6 100644 (file)
@@ -1713,4 +1713,10 @@ void Tablebases::rank_root_moves(Position& pos, Search::RootMoves& rootMoves) {
         if (dtz_available || rootMoves[0].tbScore <= VALUE_DRAW)
             Cardinality = 0;
     }
+    else
+    {
+        // Clean up if root_probe() and root_probe_wdl() have failed
+        for (auto& m : rootMoves)
+            m.tbRank = 0;
+    }
 }