X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=f7d3a9fd20f0be04863b1447a1ad622cc91f0fa6;hp=292faf0412a35e01f18320b275fed883c5efe56b;hb=3b49aeb4f22569c2b5d5ca830858c4dd584fae7f;hpb=423c6d8a8a36fcc56d421caf0bbc12f53ba62c30 diff --git a/src/search.cpp b/src/search.cpp index 292faf04..f7d3a9fd 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1540,7 +1540,8 @@ void RootMove::extract_pv_from_tt(Position& pos) { do { pv.push_back(m); - assert(pos.move_is_legal(pv[ply])); + assert(MoveList(pos).contains(pv[ply])); + pos.do_move(pv[ply++], *st++); tte = TT.probe(pos.key()); @@ -1572,7 +1573,8 @@ void RootMove::insert_pv_in_tt(Position& pos) { if (!tte || tte->move() != pv[ply]) // Don't overwrite correct entries TT.store(pos.key(), VALUE_NONE, BOUND_NONE, DEPTH_NONE, pv[ply]); - assert(pos.move_is_legal(pv[ply])); + assert(MoveList(pos).contains(pv[ply])); + pos.do_move(pv[ply++], *st++); } while (pv[ply] != MOVE_NONE);