]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Do not modify alpha in split()
[stockfish] / src / search.cpp
index 5a72d6b06d391eb3b9fc826f3c07eca4d9f5c6e1..b39bc1764dbda697e8a4d19985abd435a8f3c61c 100644 (file)
@@ -1228,8 +1228,8 @@ split_point_start: // At split points actual search starts from here
           && Threads.available_slave_exists(pos.thread())
           && !StopRequest
           && !thread.cutoff_occurred())
-          Threads.split<FakeSplit>(pos, ss, &alpha, beta, &bestValue, depth,
-                                   threatMove, moveCount, &mp, NT);
+          bestValue = Threads.split<FakeSplit>(pos, ss, alpha, beta, bestValue, depth,
+                                               threatMove, moveCount, &mp, NT);
     }
 
     // Step 20. Check for mate and stalemate
@@ -2241,8 +2241,6 @@ void ThreadsManager::idle_loop(int threadID, SplitPoint* sp) {
           // In helpful master concept a master can help only a sub-tree, and
           // because here is all finished is not possible master is booked.
           assert(threads[threadID].state == Thread::AVAILABLE);
-
-          threads[threadID].state = Thread::SEARCHING;
           return;
       }
   }