[VARC] fix potential unitialized value use in get_extents_without_var_scaled.

Callers of get_extents_without_var_scaled assume it will set extents if it has returned true.
This commit is contained in:
Garret Rieger committed 2025-07-23 14:23:07 -06:00
1 parent 4b00cec0ea
commit dd347eb4e2
1 file changed
+5 -1
+5 -1
View File
@@ -533,7 +533,11 @@ struct Glyph
bool get_extents_without_var_scaled (hb_font_t *font, const glyf_accelerator_t &glyf_accelerator,
hb_glyph_extents_t *extents) const
{
if (type == EMPTY) return true; /* Empty glyph; zero extents. */
if (type == EMPTY)
{
*extents = {0, 0, 0, 0};
return true; /* Empty glyph; zero extents. */
}
return header->get_extents_without_var_scaled (font, glyf_accelerator, gid, extents);
}