X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=e28b866e9cb26b2bc26c5bc5460a6e091aa2ef81;hp=5b4913c3d3dcdbe733ec30c92e8f90f152843c7a;hb=940c53c366c3993a024efe458fc0fb4fffd3ad70;hpb=cdf1f23bc5770c5d9e109dd254dcc54eee383464 diff --git a/src/search.cpp b/src/search.cpp index 5b4913c3..e28b866e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2155,13 +2155,11 @@ namespace { // ok_to_history() returns true if a move m can be stored - // in history. Should be a non capturing move. + // in history. Should be a non capturing move nor a promotion. bool ok_to_history(const Position& pos, Move m) { - return pos.square_is_empty(move_to(m)) - && !move_promotion(m) - && !move_is_ep(m); + return !pos.move_is_capture(m) && !move_promotion(m); }