Don't read outside of VGA screen

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-06-21 02:08:48 +02:00
parent a29051ec7f
commit 5410ebd1f6

View file

@ -58,9 +58,11 @@ inc_y (void)
else else
{ {
int x, y; int x, y;
for (y = 0; y < ROWS; y++) for (y = 0; y < ROWS - 1; y++)
for (x = 0; x < COLS; x++) for (x = 0; x < COLS; x++)
screen_write_char (x, y, screen_read_char (x, y + 1)); screen_write_char (x, y, screen_read_char (x, y + 1));
for (x = 0; x < COLS; x++)
screen_write_char (x, ROWS - 1, ' ' | (grub_console_cur_color << 8));
} }
} }