]> git.sesse.net Git - stockfish/blobdiff - src/syzygy/tbprobe.cpp
Fix comparison with uninitialized variable
[stockfish] / src / syzygy / tbprobe.cpp
index f2de036df4a540efe6921fce0941bfd75d7ef22c..4df495a84f50700b40180adf22a5d7690452b6ff 100644 (file)
@@ -1514,7 +1514,7 @@ int Tablebases::probe_dtz(Position& pos, ProbeState* result) {
 // A return value false indicates that not all probes were successful.
 bool Tablebases::root_probe(Position& pos, Search::RootMoves& rootMoves) {
 
-    ProbeState result;
+    ProbeState result = OK;
     StateInfo st;
 
     // Obtain 50-move counter for the root position
@@ -1593,7 +1593,7 @@ bool Tablebases::root_probe_wdl(Position& pos, Search::RootMoves& rootMoves) {
 
     static const int WDL_to_rank[] = { -MAX_DTZ, -MAX_DTZ + 101, 0, MAX_DTZ - 101, MAX_DTZ };
 
-    ProbeState result;
+    ProbeState result = OK;
     StateInfo st;
     WDLScore wdl;