X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=f5ff3da1862b29cf40d75a4b55e5c86ca1d3f8f3;hp=40ebb959575fd457985b19554b8bd988bc77bc6d;hb=383b12e1a5cc03a122e9a071eebde87eac85b116;hpb=d940e59dad51e78d5146bb21c8f792379df64816 diff --git a/src/position.cpp b/src/position.cpp index 40ebb959..f5ff3da1 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -591,7 +591,7 @@ bool Position::pseudo_legal(const Move m) const { if ( !(attacks_from(from, us) & pieces(~us) & to) // Not a capture && !((from + pawn_push(us) == to) && empty(to)) // Not a single push && !( (from + 2 * pawn_push(us) == to) // Not a double push - && (rank_of(from) == relative_rank(us, RANK_2)) + && (relative_rank(us, from) == RANK_2) && empty(to) && empty(to - pawn_push(us)))) return false;