]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Reset Thread::maxPly before a new search
[stockfish] / src / thread.cpp
index ab20d781796a7b602e3048431447ad409ce7041b..9f5a13f8624dac701d3827ee0d2beefca76e8cf4 100644 (file)
@@ -227,9 +227,10 @@ void ThreadsManager::read_uci_options() {
 
 void ThreadsManager::wake_up() {
 
 
 void ThreadsManager::wake_up() {
 
-  for (int i = 1; i < size(); i++) // Main thread is already running
+  for (int i = 0; i < size(); i++)
   {
       threads[i]->do_sleep = false;
   {
       threads[i]->do_sleep = false;
+      threads[i]->maxPly = 0;
 
       if (!useSleepingThreads)
           threads[i]->wake_up();
 
       if (!useSleepingThreads)
           threads[i]->wake_up();