Skip to content

Commit 284829c

Browse files
committed
Merge pull request #4 from niklasf/closable-stdin
Quit when stdin is closed
2 parents 6ba53d7 + e538a97 commit 284829c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Uci.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ void Uci::listner(IterativeDeeping *it) {
6060
perft->join();
6161
break;
6262
}
63-
getline(cin, command);
63+
if (!getline(cin, command)) {
64+
break;
65+
}
6466
istringstream uip(command, ios::in);
6567
getToken(uip, token);
6668
knowCommand = false;

0 commit comments

Comments
 (0)