mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 05:37:46 +00:00
console_handler: check for eof before trying to use input
We'll get there without input if we exited
This commit is contained in:
parent
a092fcd607
commit
b87e066f02
1 changed files with 5 additions and 4 deletions
|
@ -274,14 +274,15 @@ namespace epee
|
|||
}
|
||||
|
||||
std::string command;
|
||||
if(!m_stdin_reader.get_line(command))
|
||||
{
|
||||
LOG_PRINT("Failed to read line.", LOG_LEVEL_0);
|
||||
}
|
||||
bool get_line_ret = m_stdin_reader.get_line(command);
|
||||
if (m_stdin_reader.eos())
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (!get_line_ret)
|
||||
{
|
||||
LOG_PRINT("Failed to read line.", LOG_LEVEL_0);
|
||||
}
|
||||
string_tools::trim(command);
|
||||
|
||||
LOG_PRINT_L2("Read command: " << command);
|
||||
|
|
Loading…
Reference in a new issue