aboutsummaryrefslogtreecommitdiff
path: root/vgasrc/vgabios.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-03-05 17:11:50 -0500
committerKevin O'Connor <kevin@koconnor.net>2012-03-06 07:18:38 -0500
commit7b975e51fcc63e896dbbabf043032fca120673a1 (patch)
tree5c39b8ad1fd8314992085dc0318c366f33821125 /vgasrc/vgabios.c
parent900ded0968bb431d7987cc6f103ce2d49a760db9 (diff)
downloadseabios-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.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++;
+ }
}
}