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>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@870 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2010-09-29 17:06:31 +00:00
parent e64c1d7bad
commit 6cc8774764

View File

@@ -346,7 +346,7 @@ do_con_trol(unsigned char ch)
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;