printing: \n -> \n\r on printf

This commit is contained in:
Matheus
2026-04-01 17:40:08 -03:00
parent 924a93f7c6
commit e443319433
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -29,7 +29,10 @@ size_t console_ttywrite(void *internal, char *str, size_t count) {
}
void console_putc(char c) {
console_write(&c, 1);
if (c == '\n')
console_write("\n\r", 2);
else
console_write(&c, 1);
}
// taken from https://en.wikipedia.org/wiki/ANSI_escape_code#Terminal_input_sequences