fix unpack_points

This commit is contained in:
Michiharu Ariza 2019-03-17 18:45:30 -07:00
parent a35e3dfc77
commit cd817e7955
1 changed files with 5 additions and 2 deletions

View File

@ -266,6 +266,7 @@ struct GlyphVarData
}
points.resize (count);
unsigned int n = 0;
uint16_t i = 0;
while (i < count)
{
@ -278,7 +279,8 @@ struct GlyphVarData
for (j = 0; j < run_count && i < count; j++, i++)
{
if (!check.in_range ((const HBUINT16 *)p)) return false;
points[i] = *(const HBUINT16 *)p;
n += *(const HBUINT16 *)p;
points[i] = n;
p += HBUINT16::static_size;
}
}
@ -287,7 +289,8 @@ struct GlyphVarData
for (j = 0; j < run_count && i < count; j++, i++)
{
if (!check.in_range (p)) return false;
points[i] = *p++;
n += *p++;
points[i] = n;
}
}
if (j < run_count) return false;