X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=f7a89e07f3d88afacdf7f6ae18b80a706834d77e;hp=55f8bcff5cd960bbcb4234e72e4d4fd8900f9d10;hb=1cc18d8a7af5af3a83b95034edab679942c54e4d;hpb=c45c6d308fea4e21004675ff62d9386834372675 diff --git a/src/position.cpp b/src/position.cpp index 55f8bcff..f7a89e07 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -542,7 +542,7 @@ bool Position::is_pseudo_legal(const Move m) const { return false; // The destination square cannot be occupied by a friendly piece - if (piece_on(to) != NO_PIECE && color_of(piece_on(to)) == us) + if (pieces(us) & to) return false; // Handle the special case of a pawn move