X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftt.cpp;h=a8aa1b6574604d48fb91a513a066e6dedbaec0ae;hp=55aad112af3c252d6006265132e8cb657d70d5f6;hb=b056e5d40ab4e90530df53bb110bd74a41a8df07;hpb=d0b8bc5fdfae9efe75b9828ac72340f13718ebb4 diff --git a/src/tt.cpp b/src/tt.cpp index 55aad112..a8aa1b65 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -208,7 +208,9 @@ void TranspositionTable::insert_pv(const Position& pos, Move pv[]) { for (int i = 0; pv[i] != MOVE_NONE; i++) { - store(p.get_key(), VALUE_NONE, VALUE_TYPE_NONE, Depth(-127*OnePly), pv[i]); + TTEntry *tte = retrieve(p.get_key()); + if (!tte || tte->move() != pv[i]) + store(p.get_key(), VALUE_NONE, VALUE_TYPE_NONE, Depth(-127*OnePly), pv[i]); p.do_move(pv[i], st); } }