Fix possible div-by-zero

This commit is contained in:
Behdad Esfahbod 2017-09-18 14:33:37 -04:00
parent 0ed241cb30
commit 38a6d6fba0
1 changed files with 1 additions and 1 deletions

View File

@ -1310,7 +1310,7 @@ FcFreeTypeQueryFace (const FT_Face face,
{
double value = instance->coords[i] / (double) (1 << 16);
double default_value = master->axis[i].def / (double) (1 << 16);
double mult = value / default_value;
double mult = default_value ? value / default_value : 1;
//printf ("named-instance, axis %d tag %lx value %g\n", i, master->axis[i].tag, value);
switch (master->axis[i].tag)
{