X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=84892d094a60fd3d770b1af0ba2546724ef7b8a9;hp=2bdf1009b28ce8c006cd5cebd825202310dee943;hb=0f63b35120e79fe6cc76abdd293d58243ccdbacb;hpb=c8589903777b6e0289640b43fae966ded442af48 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