From: Fabian Fichter Date: Fri, 12 Mar 2021 09:48:45 +0000 (+0100) Subject: Reset to starting position on protocol change X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=9e64c1eaef6f7962e8a16950bd2b6208bc685ba3;p=fairystockfish.git Reset to starting position on protocol change Prevents issues with non-compliant GUIs not sending position command. --- diff --git a/src/uci.cpp b/src/uci.cpp index 0ab6275..524b081 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -318,6 +318,8 @@ void UCI::loop(int argc, char* argv[]) { #endif : "chess"); Options["UCI_Variant"].set_default(defaultVariant); + std::istringstream ss("startpos"); + position(pos, ss, states); if (token == "uci" || token == "usi" || token == "ucci") sync_cout << "id name " << engine_info(true) << "\n" << Options