diff options
-rw-r--r-- | kernel/tty.c | 6 |
1 files 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; - } } } } |