提交 15c633dd 编写于 作者: B Behdad Esfahbod

Minor

上级 9ce067c7
...@@ -274,8 +274,8 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan, ...@@ -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: ...@@ -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: ...@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册