X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=39e4be3d8ae0bb1f8958b8647704a4deb0875858;hp=5aeb9a87b71059e2097e5890bc5ea9ea19977862;hb=917944e9c5324cc9659e630570e1852270b22bd4;hpb=d9c7cad6302ddeff9f8a32a3fe66359c556a868e diff --git a/src/search.cpp b/src/search.cpp index 5aeb9a87..39e4be3d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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);