X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=516ff100868655264da9f18a7f2b6282eb61a474;hp=2fdd2840ea2b38915c453baf46783cc097909b35;hb=45ce92b89c9191f1606d82611620587157956e1b;hpb=bc86668ba4e7c88edee9f868d9322a061da53a0d diff --git a/src/search.cpp b/src/search.cpp index 2fdd2840..516ff100 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1979,13 +1979,16 @@ split_point_start: // At split points actual search starts from here TTEntry* tte; int ply = 1; - assert(pv[0] != MOVE_NONE && pos.move_is_legal(pv[0])); + assert(pv[0] != MOVE_NONE && pos.move_is_pl(pv[0])); pos.do_move(pv[0], *st++); + Bitboard pinned = pos.pinned_pieces(pos.side_to_move()); + while ( (tte = TT.probe(pos.get_key())) != NULL && tte->move() != MOVE_NONE - && pos.move_is_legal(tte->move()) + && pos.move_is_pl(tte->move()) + && pos.pl_move_is_legal(tte->move(), pinned) && ply < PLY_MAX && (!pos.is_draw() || ply < 2)) { @@ -2009,7 +2012,7 @@ split_point_start: // At split points actual search starts from here Value v, m = VALUE_NONE; int ply = 0; - assert(pv[0] != MOVE_NONE && pos.move_is_legal(pv[0])); + assert(pv[0] != MOVE_NONE && pos.move_is_pl(pv[0])); do { k = pos.get_key();