X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=73050bdf12534065495807d016753debd2e8ca3b;hp=5706b959f2d9ffeb1e0a121a001a7a44c31b5c3b;hb=821e1c72337e435d805aa2e29743d8b79c9d65a9;hpb=b1768c115cf2bbe7ed6f89dc53a8db85b4442353 diff --git a/src/search.cpp b/src/search.cpp index 5706b959..73050bdf 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1767,14 +1767,14 @@ void RootMove::extract_pv_from_tt(Position& pos) { pos.do_move(m, *st++); while ( (tte = TT.probe(pos.key())) != NULL - && tte->move() != MOVE_NONE - && pos.is_pseudo_legal(tte->move()) - && pos.pl_move_is_legal(tte->move(), pos.pinned_pieces()) + && (m = tte->move()) != MOVE_NONE // Local copy, TT entry could change + && pos.is_pseudo_legal(m) + && pos.pl_move_is_legal(m, pos.pinned_pieces()) && ply < MAX_PLY && (!pos.is_draw() || ply < 2)) { - pv.push_back(tte->move()); - pos.do_move(tte->move(), *st++); + pv.push_back(m); + pos.do_move(m, *st++); ply++; } pv.push_back(MOVE_NONE); @@ -1865,7 +1865,7 @@ void Thread::idle_loop(SplitPoint* sp_master) { lock_grab(Threads.splitLock); assert(is_searching); - SplitPoint* sp = splitPoint; + SplitPoint* sp = curSplitPoint; lock_release(Threads.splitLock);