X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=c0e355b7522b4044a7f4c5d1ab89620abdfd5ed5;hp=d0ddbd55045639a4e0a0ea87b8d46753c015bb83;hb=93c9f342ca4f2230021ddbca83a991ff90a6a246;hpb=16acf57773ca4558b60ac4af4bc5ad16998df686 diff --git a/src/search.cpp b/src/search.cpp index d0ddbd55..c0e355b7 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1135,7 +1135,7 @@ namespace { moveIsCheck = pos.move_is_check(move, ci); captureOrPromotion = pos.move_is_capture_or_promotion(move); - movesSearched[moveCount++] = ss[ply].currentMove = move; + movesSearched[moveCount++] = move; // Decide the new search depth ext = extension(pos, move, true, captureOrPromotion, moveIsCheck, singleReply, mateThreat, &dangerous); @@ -1160,6 +1160,9 @@ namespace { newDepth = depth - OnePly + ext; + // Update current move + ss[ply].currentMove = move; + // Make and search the move pos.do_move(move, st, ci, moveIsCheck); @@ -1434,7 +1437,7 @@ namespace { moveIsCheck = pos.move_is_check(move, ci); captureOrPromotion = pos.move_is_capture_or_promotion(move); - movesSearched[moveCount++] = ss[ply].currentMove = move; + movesSearched[moveCount++] = move; // Decide the new search depth ext = extension(pos, move, false, captureOrPromotion, moveIsCheck, singleReply, mateThreat, &dangerous); @@ -1460,6 +1463,9 @@ namespace { newDepth = depth - OnePly + ext; + // Update current move + ss[ply].currentMove = move; + // Futility pruning if ( useFutilityPruning && !dangerous