]> git.sesse.net Git - stockfish/blobdiff - src/tt.cpp
Retire pv[] from SearchStack
[stockfish] / src / tt.cpp
index fc0bdfb47c1c96f1738c8403795640fbf13056f8..6dd2a10d339e8b7584375e7cc63f7241eaea3852 100644 (file)
@@ -192,9 +192,9 @@ void TranspositionTable::extract_pv(const Position& pos, Move pv[], const int PL
   Position p(pos, pos.thread());
   int ply = 0;
 
-  // Update position to the end of current PV
-  while (pv[ply] != MOVE_NONE)
-      p.do_move(pv[ply++], st);
+  assert(pv[0] != MOVE_NONE);
+
+  p.do_move(pv[ply++], st);
 
   // Try to add moves from TT while possible
   while (   (tte = retrieve(p.get_key())) != NULL