CLI: startInteractive(): Handle bad()/eof()
Dieser Commit ist enthalten in:
Ursprung
95c5c4e155
Commit
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())
|
||||
{
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren