]> git.sesse.net Git - stockfish/commitdiff
Simplify next_move by always scoring evasions
authorJoost Vandevondele <Joost.VandeVondele@gmail.com>
Sun, 16 Oct 2016 13:20:05 +0000 (15:20 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 20 Oct 2016 15:17:14 +0000 (17:17 +0200)
For a default bench, this fixes the last valgrind
error (jump on uninitialised value).

Passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 187869 W: 33303 L: 33463 D: 121103

No functional change.

src/movepick.cpp

index 95e60003f00b6eafc9d5f5592e0cdd22c64bedef..c187c3ad6ee8a914ea9eb0904e89cc8dbff47374 100644 (file)
@@ -271,8 +271,7 @@ Move MovePicker::next_move() {
   case EVASIONS_INIT:
       cur = moves;
       endMoves = generate<EVASIONS>(pos, cur);
-      if (endMoves - cur - (ttMove != MOVE_NONE) > 1)
-          score<EVASIONS>();
+      score<EVASIONS>();
       ++stage;
 
   case ALL_EVASIONS: