Minor
This commit is contained in:
parent
9ce067c775
commit
15c633dd1f
|
@ -274,8 +274,8 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
|
||||||
while ((DIV_CEIL (sizeof (hb_graphite2_cluster_t) * buffer->len, sizeof (*scratch)) +
|
while ((DIV_CEIL (sizeof (hb_graphite2_cluster_t) * buffer->len, sizeof (*scratch)) +
|
||||||
DIV_CEIL (sizeof (hb_codepoint_t) * glyph_count, sizeof (*scratch))) > scratch_size)
|
DIV_CEIL (sizeof (hb_codepoint_t) * glyph_count, sizeof (*scratch))) > scratch_size)
|
||||||
{
|
{
|
||||||
buffer->ensure (buffer->allocated * 2);
|
if (unlikely (!buffer->ensure (buffer->allocated * 2)))
|
||||||
if (unlikely (buffer->in_error)) {
|
{
|
||||||
if (feats) gr_featureval_destroy (feats);
|
if (feats) gr_featureval_destroy (feats);
|
||||||
gr_seg_destroy (seg);
|
gr_seg_destroy (seg);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -903,8 +903,7 @@ retry:
|
||||||
FAIL ("ScriptShapeOpenType() set fNoGlyphIndex");
|
FAIL ("ScriptShapeOpenType() set fNoGlyphIndex");
|
||||||
if (unlikely (hr == E_OUTOFMEMORY))
|
if (unlikely (hr == E_OUTOFMEMORY))
|
||||||
{
|
{
|
||||||
buffer->ensure (buffer->allocated * 2);
|
if (unlikely (!buffer->ensure (buffer->allocated * 2)))
|
||||||
if (unlikely (buffer->in_error))
|
|
||||||
FAIL ("Buffer resize failed");
|
FAIL ("Buffer resize failed");
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
@ -973,8 +972,7 @@ retry:
|
||||||
|
|
||||||
#undef utf16_index
|
#undef utf16_index
|
||||||
|
|
||||||
buffer->ensure (glyphs_len);
|
if (unlikely (!buffer->ensure (glyphs_len)))
|
||||||
if (unlikely (buffer->in_error))
|
|
||||||
FAIL ("Buffer in error");
|
FAIL ("Buffer in error");
|
||||||
|
|
||||||
#undef FAIL
|
#undef FAIL
|
||||||
|
|
Loading…
Reference in New Issue