Merge mainline into ofwfb

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-31 01:59:35 +01:00
commit 69efaa32d2
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2010-01-31 Vladimir Serbinenko <phcoder@gmail.com>
* font/font.c (find_glyph): Check that bmp_idx is available before
using it.
(grub_font_get_string_width): Never call grub_font_get_glyph_internal
with (font == NULL).
2010-01-28 Christian Schmitt <chris@ilovelinux.de>
* util/ieee1275/grub-install.in: Fix nvsetenv arguments.

View File

@ -668,7 +668,7 @@ find_glyph (const grub_font_t font, grub_uint32_t code)
table = font->char_index;
/* Use BMP index if possible. */
if (code < 0x10000)
if (code < 0x10000 && font->bmp_idx)
{
if (font->bmp_idx[code] == 0xffff)
return 0;
@ -942,8 +942,9 @@ grub_font_get_string_width (grub_font_t font, const char *str)
struct grub_font_glyph *
grub_font_get_glyph (grub_font_t font, grub_uint32_t code)
{
struct grub_font_glyph *glyph;
glyph = grub_font_get_glyph_internal (font, code);
struct grub_font_glyph *glyph = 0;
if (font)
glyph = grub_font_get_glyph_internal (font, code);
if (glyph == 0)
{
glyph = ascii_glyph_lookup (code);