From efd7bf67948e48220524168dcbd45141d7490961 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Sun, 2 Feb 2025 22:04:04 +0100 Subject: [PATCH] gave default values to the board fields because they were causing undefinied behaviour --- cpp/src/board.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/src/board.hpp b/cpp/src/board.hpp index f1c917b..2743172 100644 --- a/cpp/src/board.hpp +++ b/cpp/src/board.hpp @@ -12,9 +12,9 @@ struct Board { public: int8_t squares[64] = {Piece::None}; - bool white_to_play; - CastleSide w_castle_rights; - CastleSide b_castle_rights; + bool white_to_play = true; + int8_t w_castle_rights = CastleSide::NeitherSide; + int8_t b_castle_rights = CastleSide::NeitherSide; static Board setup_fen_position(std::string fen);