CLI: startInteractive(): Handle bad()/eof()
This commit is contained in:
부모
95c5c4e155
커밋
57c28b2426
10
cli.cpp
10
cli.cpp
@ -205,6 +205,16 @@ void CLI::startInteractive()
|
||||
std::cout << "> ";
|
||||
std::getline(std::cin, input);
|
||||
|
||||
if(std::cin.bad() || std::cin.eof())
|
||||
{
|
||||
std::cout << "Exiting" << std::endl;
|
||||
return;
|
||||
}
|
||||
if(input.empty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
std::vector<std::string> splitted = utils::split(input, "\\s+");
|
||||
if(splitted.empty())
|
||||
{
|
||||
|
불러오는 중...
Reference in New Issue
Block a user