[GX] Skip tail zero entries when setting variation coordinates
This commit is contained in:
parent
1124d2ece5
commit
250bcd6fb6
|
@ -1556,6 +1556,10 @@ hb_font_set_var_coords_normalized (hb_font_t *font,
|
||||||
if (font->immutable)
|
if (font->immutable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* Skip tail zero entries. */
|
||||||
|
while (coords_length && !coords[coords_length - 1])
|
||||||
|
coords_length--;
|
||||||
|
|
||||||
int *copy = (int *) calloc (coords_length, sizeof (coords[0]));
|
int *copy = (int *) calloc (coords_length, sizeof (coords[0]));
|
||||||
if (unlikely (!copy))
|
if (unlikely (!copy))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue