Skip to content

Commit

Permalink
Deal with commented lines in UCI input
Browse files Browse the repository at this point in the history
commands starting with '#' as the first character will be ignored

closes official-stockfish#3378

No functional change
  • Loading branch information
mattginsberg authored and Fanael committed Mar 10, 2021
1 parent 550d3d8 commit 42b44ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void UCI::loop(int argc, char* argv[]) {
else if (token == "d") sync_cout << pos << sync_endl;
else if (token == "eval") sync_cout << Eval::trace(pos) << sync_endl;
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
Expand Down

0 comments on commit 42b44ee

Please sign in to comment.