Restrict mobility of pinned pieces
[stockfish] / src / movegen.cpp
index 96dd89c502f1e441e5e5edfa0b55fe1a8f7cbb8b..1524bf1f2453baa1152e9c95874209c91184d04c 100644 (file)
@@ -407,7 +407,7 @@ template<>
 ExtMove* generate<LEGAL>(const Position& pos, ExtMove* mlist) {
 
   ExtMove *end, *cur = mlist;
-  Bitboard pinned = pos.pinned_pieces();
+  Bitboard pinned = pos.pinned_pieces(pos.side_to_move());
   Square ksq = pos.king_square(pos.side_to_move());
 
   end = pos.checkers() ? generate<EVASIONS>(pos, mlist)