]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Sync sp_search() with search()
[stockfish] / src / search.cpp
index 63a8221a5c57b2408d7d1e5a5552d2e689a14880..6ec744c859596415703fa8bef8e520f7eba47879 100644 (file)
@@ -1692,13 +1692,12 @@ namespace {
       if (value > sp->bestValue && !ThreadsMgr.thread_should_stop(threadID))
       {
           sp->bestValue = value;
-
-          if (sp->bestValue > sp->alpha)
+          if (value > sp->alpha)
           {
               if (!PvNode || value >= sp->beta)
                   sp->stopRequest = true;
 
-              if (PvNode && value < sp->beta) // This guarantees that always: sp->alpha < sp->beta
+              if (PvNode && value < sp->beta) // We want always sp->alpha < sp->beta
                   sp->alpha = value;
 
               sp->parentSstack->bestMove = ss->bestMove = move;