aboutsummaryrefslogtreecommitdiff
path: root/vgasrc
diff options
context:
space:
mode:
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/vgabios.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index 58e467d..faf57b1 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -510,10 +510,15 @@ handle_1008(struct bregs *regs)
static void noinline
write_chars(u8 page, struct carattr ca, u16 count)
{
+ u16 nbcols = GET_BDA(video_cols);
struct cursorpos cp = get_cursor_pos(page);
while (count--) {
vgafb_write_char(cp, ca);
cp.x++;
+ if (cp.x >= nbcols) {
+ cp.x -= nbcols;
+ cp.y++;
+ }
}
}