[sbix] Fix uninitialized variables

This commit is contained in:
Behdad Esfahbod 2018-10-28 14:52:25 -07:00
parent 01c7d53fb7
commit 946b534419
1 changed files with 3 additions and 2 deletions

View File

@ -246,15 +246,16 @@ struct sbix
if (likely (sbix_len == 0))
return false;
int x_offset, y_offset;
int x_offset = 0, y_offset = 0;
hb_blob_t *blob = reference_blob_for_glyph (font, glyph,
HB_TAG ('p','n','g',' '),
&x_offset, &y_offset);
const PNGHeader &png = *blob->as<PNGHeader>();
if (unlikely (blob->length < sizeof (PNGHeader)))
return false;
const PNGHeader &png = *blob->as<PNGHeader>();
extents->x_bearing = x_offset;
extents->y_bearing = y_offset;
extents->width = png.IHDR.width;