diff --git a/src/uci/uci.h b/src/uci/uci.h index 69b790a..bc8c6e2 100644 --- a/src/uci/uci.h +++ b/src/uci/uci.h @@ -174,10 +174,9 @@ namespace uci { while (should_continue) { std::string line; - getline(std::cin, line); - if (std::cin.eof()) { - break; + if (!getline(std::cin, line) && std::cin.eof()) { + line = "quit"; } std::vector tokens = convert_to_tokens(line);