From 1a868b3b2651e55a50984e21d1c0111a05c66c18 Mon Sep 17 00:00:00 2001 From: winapiadmin <138602885+winapiadmin@users.noreply.github.com> Date: Sun, 1 Mar 2026 11:51:18 +0700 Subject: [PATCH 1/4] fix #35# --- position.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/position.cpp b/position.cpp index 75cd91f..208f58e 100644 --- a/position.cpp +++ b/position.cpp @@ -196,6 +196,7 @@ template void _Position::setFEN(const s current_state = HistoryEntry(); history.clear(); _chess960 = chess960; + std::fill(std::begin(pieces_list), std::end(pieces_list), PieceC::NO_PIECE); std::istringstream ss(str); std::string board_fen, active_color, castling, enpassant; int halfmove = 0, fullmove = 1; From fb9f24df467f201f1d27101db1e801cd88518883 Mon Sep 17 00:00:00 2001 From: winapiadmin <138602885+winapiadmin@users.noreply.github.com> Date: Sun, 1 Mar 2026 11:52:18 +0700 Subject: [PATCH 2/4] Update try_compile.yml --- .github/workflows/try_compile.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/try_compile.yml b/.github/workflows/try_compile.yml index ac4ae2b..3c811f5 100644 --- a/.github/workflows/try_compile.yml +++ b/.github/workflows/try_compile.yml @@ -1,7 +1,6 @@ name: CMake on multiple platforms on: - push: pull_request: jobs: From 4d662ea11ebbf3278d0946c406243ad095bfd280 Mon Sep 17 00:00:00 2001 From: winapiadmin <138602885+winapiadmin@users.noreply.github.com> Date: Sun, 1 Mar 2026 11:53:37 +0700 Subject: [PATCH 3/4] Update tests.cpp --- tests.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests.cpp b/tests.cpp index 84c1d73..637adc5 100644 --- a/tests.cpp +++ b/tests.cpp @@ -1330,6 +1330,11 @@ TEST_CASE("Experienced bugs in this repo") { REQUIRE(p.getCastlingPath(BLACK, true) == 0x6000000000000000ULL); REQUIRE(p.getCastlingPath(BLACK, false) == 0xe00000000000000ULL); } + { + Position p; + p.setFEN("1nbqkbnr/1ppppppp/r7/8/4P3/8/PPPP1PPP/RNBQK1NR w KQk - 0 3"); + REQUIRE(p.fen()=="1nbqkbnr/1ppppppp/r7/8/4P3/8/PPPP1PPP/RNBQK1NR w KQk - 0 3"); + } } TEST_CASE("Captures only?") { std::vector> tests = { From d4fa52dc1bd6beaa6d6703e5e55705cbe132b14e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 1 Mar 2026 04:53:56 +0000 Subject: [PATCH 4/4] Apply clang-format --- tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.cpp b/tests.cpp index 637adc5..179d80d 100644 --- a/tests.cpp +++ b/tests.cpp @@ -1333,7 +1333,7 @@ TEST_CASE("Experienced bugs in this repo") { { Position p; p.setFEN("1nbqkbnr/1ppppppp/r7/8/4P3/8/PPPP1PPP/RNBQK1NR w KQk - 0 3"); - REQUIRE(p.fen()=="1nbqkbnr/1ppppppp/r7/8/4P3/8/PPPP1PPP/RNBQK1NR w KQk - 0 3"); + REQUIRE(p.fen() == "1nbqkbnr/1ppppppp/r7/8/4P3/8/PPPP1PPP/RNBQK1NR w KQk - 0 3"); } } TEST_CASE("Captures only?") {