Fix ReadCharFromStdinBlocking

This commit is contained in:
Fangrui Song 2018-01-15 00:00:29 -08:00
parent 96a23bc573
commit 159b0b968d

View File

@ -107,9 +107,10 @@ TEST_SUITE("FindIncludeLine") {
}
optional<char> ReadCharFromStdinBlocking() {
char c = 0;
std::cin.read(&c, 1);
return c;
char c;
if (std::cin.read(&c, 1))
return c;
return nullopt;
}
std::unique_ptr<BaseIpcMessage> MessageRegistry::ReadMessageFromStdin(