X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=84892d094a60fd3d770b1af0ba2546724ef7b8a9;hp=2bdf1009b28ce8c006cd5cebd825202310dee943;hb=82ad9ce9cfb0eff33f1d781f329f7c5dc0b277eb;hpb=95ba7f78d5e025499ec8124e37e9f3b769660e4a diff --git a/src/position.cpp b/src/position.cpp index 2bdf1009..84892d09 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -628,7 +628,7 @@ bool Position::pseudo_legal(const Move m) const { { // We have already handled promotion moves, so destination // cannot be on the 8th/1st rank. - if (rank_of(to) == relative_rank(us, RANK_8)) + if ((Rank8BB | Rank1BB) & to) return false; if ( !(attacks_from(from, us) & pieces(~us) & to) // Not a capture