]> git.sesse.net Git - stockfish/blobdiff - src/movegen.cpp
Change piece_attacks_square() API
[stockfish] / src / movegen.cpp
index 817b4f98f0763f01007e728299b23ff5ca8a5696..a002e19fe98c92b64f29e547143633ba619e1416 100644 (file)
@@ -539,7 +539,7 @@ bool move_is_legal(const Position& pos, const Move m, Bitboard pinned) {
   }
 
   // Luckly we can handle all the other pieces in one go
-  return (   pos.piece_attacks_square(from, to)
+  return (   pos.piece_attacks_square(pos.piece_on(from), from, to)
           && pos.pl_move_is_legal(m, pinned)
           && !move_promotion(m));
 }