From 71e63d03f95d559c709911844ef1fc9907c74f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 4 Nov 2015 13:40:40 +0100 Subject: tty: putc support '\n' --- kernel/tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/tty.c b/kernel/tty.c index 628a21e..5de2f3b 100644 --- a/kernel/tty.c +++ b/kernel/tty.c @@ -56,14 +56,14 @@ void tty_putc(char c) if (c == '\n') { tty_col = 0; - tty_row++; + if (++tty_row == VGA_HEIGHT) + tty_row = 0; } else { tty_putc_at(c, tty_color, tty_col, tty_row); if (++tty_col == VGA_WIDTH) { tty_col = 0; - if (++tty_row == VGA_HEIGHT) { + if (++tty_row == VGA_HEIGHT) tty_row = 0; - } } } } -- cgit v1.1-2-g2b99