summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-11-04 13:40:40 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-11-04 13:40:40 +0100
commit71e63d03f95d559c709911844ef1fc9907c74f49 (patch)
tree79d512661d9a4b646c4771178ff16caf13827f57
parent0fc6d68615c4921bbe73ee415ef06a921ff666e2 (diff)
downloadjeyzuos-71e63d03f95d559c709911844ef1fc9907c74f49.zip
jeyzuos-71e63d03f95d559c709911844ef1fc9907c74f49.tar.gz
tty: putc support '\n'
-rw-r--r--kernel/tty.c6
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;
- }
}
}
}