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
+3
View File
@@ -29,6 +29,9 @@ size_t console_ttywrite(void *internal, char *str, size_t count) {
}
void console_putc(char c) {
if (c == '\n')
console_write("\n\r", 2);
else
console_write(&c, 1);
}
+3
View File
@@ -47,6 +47,9 @@ void term_write(char *str, size_t count) {
}
void term_putchar(char c) {
if (c == '\n')
flanterm_write(term_ctx, "\n\r", 2);
else
flanterm_write(term_ctx, &c, 1);
}