Correctly fix "break from split" patch
authorMarco Costalba <mcostalba@gmail.com>
Sat, 3 Nov 2012 16:06:49 +0000 (17:06 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 3 Nov 2012 16:09:18 +0000 (17:09 +0100)
In case split cut-offs we return with still
some moves to go but we really want to break
out from the loop now.

No functional change.

src/search.cpp

index 03d05796ae69bd2df092183764604e9ac7f1d85d..253311ae11c9ff122a4f40db5ab4e3bc07ef81e5 100644 (file)
@@ -1016,8 +1016,12 @@ split_point_start: // At split points actual search starts from here
           &&  depth >= Threads.min_split_depth()
           &&  bestValue < beta
           &&  Threads.available_slave_exists(thisThread))
+      {
           bestValue = Threads.split<FakeSplit>(pos, ss, alpha, beta, bestValue, &bestMove,
                                                depth, threatMove, moveCount, mp, NT);
+          if (bestValue >= beta)
+              break;
+      }
     }
 
     if (SpNode)