[var] Fix the just introduced hb_font_set_var_coords_design storing bug

The memcpy call was using the current coords count which is zero initially so no copy at all.

Sad that no test has caught it, should see why, will however with the upcoming style API tests.
This commit is contained in:
Ebrahim Byagowi 2020-02-08 13:17:06 +03:30
parent 5c1a023f67
commit 40166eb0e5
1 changed files with 1 additions and 1 deletions

View File

@ -1940,7 +1940,7 @@ hb_font_set_var_coords_design (hb_font_t *font,
}
if (coords_length)
memcpy (design_coords, coords, font->num_coords * sizeof (font->design_coords[0]));
memcpy (design_coords, coords, coords_length * sizeof (font->design_coords[0]));
hb_ot_var_normalize_coords (font->face, coords_length, coords, normalized);
_hb_font_adopt_var_coords (font, normalized, design_coords, coords_length);