]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Don't reparent if a cutoff is pending
[stockfish] / src / thread.cpp
index 6d07ec35f3e29d1e83295c7417481dac7c9ffead..a644cae9b64ede6d5a1e682cd62f5aff9b4e01af 100644 (file)
@@ -313,7 +313,7 @@ Value ThreadsManager::split(Position& pos, Stack* ss, Value alpha, Value beta,
       return bestValue;
 
   // Pick the next available split point from the split point stack
-  SplitPoint* sp = &master->splitPoints[master->splitPointsCnt++];
+  SplitPoint* sp = &master->splitPoints[master->splitPointsCnt];
 
   sp->parent = master->curSplitPoint;
   sp->master = master;
@@ -362,6 +362,8 @@ Value ThreadsManager::split(Position& pos, Stack* ss, Value alpha, Value beta,
           }
       }
 
+  master->splitPointsCnt++;
+
   lock_release(splitLock);
   lock_release(sp->lock);