[hb-old] Fixup not-enough-space handling
This commit is contained in:
parent
91e721ea86
commit
9550a8c4e8
|
@ -329,14 +329,15 @@ retry:
|
||||||
#undef ALLOCATE_ARRAY
|
#undef ALLOCATE_ARRAY
|
||||||
|
|
||||||
if (!HB_ShapeItem (&item))
|
if (!HB_ShapeItem (&item))
|
||||||
return false;
|
|
||||||
|
|
||||||
if (unlikely (item.num_glyphs > num_glyphs))
|
|
||||||
{
|
{
|
||||||
buffer->ensure (buffer->allocated * 2);
|
if (unlikely (item.num_glyphs > num_glyphs))
|
||||||
if (buffer->in_error)
|
{
|
||||||
FAIL ("Buffer resize failed");
|
buffer->ensure (buffer->allocated * 2);
|
||||||
goto retry;
|
if (buffer->in_error)
|
||||||
|
FAIL ("Buffer resize failed");
|
||||||
|
goto retry;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
num_glyphs = item.num_glyphs;
|
num_glyphs = item.num_glyphs;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue