* grub-core/term/gfxterm.c: Avoid division by zero.

This commit is contained in:
Vladimir Serbinenko 2015-01-20 20:50:35 +01:00
parent e95685dab1
commit c453760c71
2 changed files with 6 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/term/gfxterm.c: Avoid division by zero.
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
Avoid division by zero in serial.

View file

@ -221,6 +221,8 @@ grub_virtual_screen_setup (unsigned int x, unsigned int y,
calculate_normal_character_width (virtual_screen.font);
virtual_screen.normal_char_height =
grub_font_get_max_char_height (virtual_screen.font);
if (virtual_screen.normal_char_height == 0)
virtual_screen.normal_char_height = 16;
virtual_screen.cursor_x = 0;
virtual_screen.cursor_y = 0;
virtual_screen.cursor_state = 1;