fix unpack_points
This commit is contained in:
parent
a35e3dfc77
commit
cd817e7955
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue