X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=ba399b128c45ea7ab30c4440d71682fe1817ba25;hp=cbaa07e86e6c7925aa810347fc63688f63810252;hb=428962a;hpb=4f6b1bf3bee68f138d1b5fc234fd25901cffa42c;ds=sidebyside diff --git a/src/position.cpp b/src/position.cpp index cbaa07e8..ba399b12 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -409,16 +409,16 @@ const string Position::fen() const { ss << (sideToMove == WHITE ? " w " : " b "); if (can_castle(WHITE_OO)) - ss << (chess960 ? to_char(file_of(castling_rook_square(WHITE | KING_SIDE)), false) : 'K'); + ss << (chess960 ? 'A' + file_of(castling_rook_square(WHITE | KING_SIDE)) : 'K'); if (can_castle(WHITE_OOO)) - ss << (chess960 ? to_char(file_of(castling_rook_square(WHITE | QUEEN_SIDE)), false) : 'Q'); + ss << (chess960 ? 'A' + file_of(castling_rook_square(WHITE | QUEEN_SIDE)) : 'Q'); if (can_castle(BLACK_OO)) - ss << (chess960 ? to_char(file_of(castling_rook_square(BLACK | KING_SIDE)), true) : 'k'); + ss << (chess960 ? 'a' + file_of(castling_rook_square(BLACK | KING_SIDE)) : 'k'); if (can_castle(BLACK_OOO)) - ss << (chess960 ? to_char(file_of(castling_rook_square(BLACK | QUEEN_SIDE)), true) : 'q'); + ss << (chess960 ? 'a' + file_of(castling_rook_square(BLACK | QUEEN_SIDE)) : 'q'); if (!can_castle(WHITE) && !can_castle(BLACK)) ss << '-';