Author: blueswirl Date: Wed Sep 29 19:06:31 2010 New Revision: 870 URL: http://tracker.coreboot.org/trac/openbios/changeset/870
Log: console: fix off-by-one errror
The maximum allowed value for x axis is one less than cons.w.
Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/libopenbios/console_common.c
Modified: trunk/openbios-devel/libopenbios/console_common.c ============================================================================== --- trunk/openbios-devel/libopenbios/console_common.c Wed Sep 29 18:28:28 2010 (r869) +++ trunk/openbios-devel/libopenbios/console_common.c Wed Sep 29 19:06:31 2010 (r870) @@ -346,7 +346,7 @@ draw_line(cons.y); return; case 2: /* erase whole line */ - for (i = 0; i <= cons.w; i++) + for (i = 0; i < cons.w; i++) cons.buf[cons.y * cons.w + i] = ' '; draw_line(cons.y); return;