[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:
2020-12-23 12:36:43 -08:00
parent 2e3d7b1656
commit 7bdde2d359

View File

@@ -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');
}
}