]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix an assert in SMP case
[stockfish] / src / search.cpp
index 5aeb9a87b71059e2097e5890bc5ea9ea19977862..39e4be3d8ae0bb1f8958b8647704a4deb0875858 100644 (file)
@@ -1075,9 +1075,8 @@ moves_loop: // When in check and at SpNode search starts from here
         Value bonus = Value(int(depth) * int(depth));
         History.update(pos.moved_piece(bestMove), to_sq(bestMove), bonus);
 
-        if (bestMove != ttMove)
-            for (const ExtMove* em = mp.stage_moves(); em->move != bestMove; ++em)
-                History.update(pos.moved_piece(em->move), to_sq(em->move), -bonus);
+        for (const ExtMove* em = mp.quiet_moves(); em && em->move != bestMove; ++em)
+            History.update(pos.moved_piece(em->move), to_sq(em->move), -bonus);
 
         if (is_ok((ss-1)->currentMove))
             Countermoves.update(pos.piece_on(prevMoveSq), prevMoveSq, bestMove);