mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Fix console line endings
The console's putc() was looking for CRs and if it saw one, appending an LF. The output was only writing LFs, though, so instead what's needed is to look for LFs, and if it sees one, insert a CR first.
This commit is contained in:
@@ -279,8 +279,8 @@ console::putc(char c)
|
||||
if (m_screen) m_screen->putc(c);
|
||||
|
||||
if (m_serial) {
|
||||
if (c == '\n') m_serial->write('\r');
|
||||
m_serial->write(c);
|
||||
if (c == '\r') m_serial->write('\n');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user