diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2012-03-05 17:11:50 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-03-06 07:18:38 -0500 |
commit | 7b975e51fcc63e896dbbabf043032fca120673a1 (patch) | |
tree | 5c39b8ad1fd8314992085dc0318c366f33821125 /vgasrc/vgabios.c | |
parent | 900ded0968bb431d7987cc6f103ce2d49a760db9 (diff) | |
download | seabios-hppa-7b975e51fcc63e896dbbabf043032fca120673a1.zip seabios-hppa-7b975e51fcc63e896dbbabf043032fca120673a1.tar.gz seabios-hppa-7b975e51fcc63e896dbbabf043032fca120673a1.tar.bz2 |
vgabios: int1009 handler bug limits count to 256 characters.
Fix bug (u8 overflow) causing large screen fills to fail.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/vgabios.c')
-rw-r--r-- | vgasrc/vgabios.c | 5 |
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++; + } } } |