Fix incorrect 'ss' pointer in early stop check
authorMarco Costalba <mcostalba@gmail.com>
Sun, 9 Jun 2013 08:58:24 +0000 (10:58 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 9 Jun 2013 09:01:11 +0000 (11:01 +0200)
The exclusion search used to verify one move is much
better than other shall be called with 'ss' and not
'ss+1'

No functional change.

src/search.cpp

index 1d81fd045d447312ad85302a4addacca087e4707..1268445555a608c87b55c0d4e307f6f4172814ab 100644 (file)
@@ -455,11 +455,11 @@ namespace {
                     || Time::now() - SearchTime > (TimeMgr.available_time() * 20) / 100))
             {
                 Value rBeta = bestValue - 2 * PawnValueMg;
-                (ss+1)->excludedMove = RootMoves[0].pv[0];
-                (ss+1)->skipNullMove = true;
-                Value v = search<NonPV>(pos, ss+1, rBeta - 1, rBeta, (depth - 3) * ONE_PLY);
-                (ss+1)->skipNullMove = false;
-                (ss+1)->excludedMove = MOVE_NONE;
+                ss->excludedMove = RootMoves[0].pv[0];
+                ss->skipNullMove = true;
+                Value v = search<NonPV>(pos, ss, rBeta - 1, rBeta, (depth - 3) * ONE_PLY);
+                ss->skipNullMove = false;
+                ss->excludedMove = MOVE_NONE;
 
                 if (v < rBeta)
                     stop = true;