mirror of
https://github.com/autc04/Retro68.git
synced 2025-01-01 10:31:57 +00:00
fix double \n on stdin from console (#99)
This commit is contained in:
parent
e4b1ee0920
commit
584b626d13
@ -98,11 +98,8 @@ extern "C" ssize_t _consoleread(int fd, void *buf, size_t count)
|
||||
|
||||
static std::string consoleBuf;
|
||||
if(consoleBuf.size() == 0)
|
||||
{
|
||||
consoleBuf = Console::currentInstance->ReadLine();
|
||||
if(!Console::currentInstance->IsEOF())
|
||||
consoleBuf += "\n";
|
||||
}
|
||||
consoleBuf = Console::currentInstance->ReadLine();
|
||||
|
||||
if(count > consoleBuf.size())
|
||||
count = consoleBuf.size();
|
||||
memcpy(buf, consoleBuf.data(), count);
|
||||
|
Loading…
Reference in New Issue
Block a user