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;