]> git.sesse.net Git - stockfish/blobdiff - src/uci.cpp
Clear token before reading from input
[stockfish] / src / uci.cpp
index ee1b07023a5fe97b17a8c28cb8911fd9caaefc73..0f67c4401fd6a0b53fef53a27118e63dc0ff626e 100644 (file)
@@ -157,6 +157,7 @@ void UCI::loop(int argc, char* argv[]) {
 
       istringstream is(cmd);
 
+      token.clear(); // getline() could return empty or blank line
       is >> skipws >> token;
 
       if (token == "quit" || token == "stop" || token == "ponderhit")