X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovegen.cpp;h=b4a9d27ba1d7459fcc959ba30fc4fe88a84a6a1b;hp=833cd2fc88ec74d94ae19599408715621773baa6;hb=e917bd59b1e317c6b48dc676473359fdfb86d9d4;hpb=e8ffca3eb49f607d361688c41c9ae9b3b3de4b80 diff --git a/src/movegen.cpp b/src/movegen.cpp index 833cd2fc..b4a9d27b 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -278,7 +278,7 @@ namespace { *moveList++ = make_move(ksq, pop_lsb(&b)); } - if (Type != CAPTURES && Type != EVASIONS && pos.can_castle(Us)) + if (Type != CAPTURES && Type != EVASIONS && pos.castling_rights(Us)) { if (pos.is_chess960()) {