X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovegen.cpp;h=76a27d9f4936320165c0378f2b59225038b0abbe;hp=b4a9d27ba1d7459fcc959ba30fc4fe88a84a6a1b;hb=59d32f8eddf4fc8138f419777fbabf58080f1caa;hpb=e917bd59b1e317c6b48dc676473359fdfb86d9d4 diff --git a/src/movegen.cpp b/src/movegen.cpp index b4a9d27b..76a27d9f 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -29,7 +29,7 @@ namespace { ExtMove* generate_castling(const Position& pos, ExtMove* moveList) { constexpr CastlingRight Cr = Us | Cs; - constexpr bool KingSide = (Cr == WHITE_OO || Cr == BLACK_OO); + constexpr bool KingSide = (Cs == KING_SIDE); if (pos.castling_impeded(Cr) || !pos.can_castle(Cr)) return moveList;