From 5346f1c6c72e46d66bb4c21259f8c06096c63034 Mon Sep 17 00:00:00 2001 From: mattginsberg Date: Sun, 28 Feb 2021 07:59:07 -0800 Subject: [PATCH] Deal with commented lines in UCI input commands starting with '#' as the first character will be ignored closes https://github.com/official-stockfish/Stockfish/pull/3378 No functional change --- src/uci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uci.cpp b/src/uci.cpp index 47a8824e..051ff2e0 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -277,7 +277,7 @@ void UCI::loop(int argc, char* argv[]) { else if (token == "d") sync_cout << pos << sync_endl; else if (token == "eval") trace_eval(pos); else if (token == "compiler") sync_cout << compiler_info() << sync_endl; - else + else if (!token.empty() && token[0] != '#') sync_cout << "Unknown command: " << cmd << sync_endl; } while (token != "quit" && argc == 1); // Command line args are one-shot -- 2.39.2