Restrict mobility of pinned pieces
[stockfish] / src / search.cpp
index 21756824b815bfa58f37f1f4f948277466dab7a8..0de9e8f9c85da4d7800ccdd32086eb831f0a0454 100644 (file)
@@ -1507,7 +1507,7 @@ void RootMove::extract_pv_from_tt(Position& pos) {
 
   } while (   tte
            && pos.pseudo_legal(m = tte->move()) // Local copy, TT could change
-           && pos.legal(m, pos.pinned_pieces())
+           && pos.legal(m, pos.pinned_pieces(pos.side_to_move()))
            && ply < MAX_PLY
            && (!pos.is_draw() || ply < 2));