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

Minor

上级 9ce067c7
......@@ -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)) +
DIV_CEIL (sizeof (hb_codepoint_t) * glyph_count, sizeof (*scratch))) > scratch_size)
{
buffer->ensure (buffer->allocated * 2);
if (unlikely (buffer->in_error)) {
if (unlikely (!buffer->ensure (buffer->allocated * 2)))
{
if (feats) gr_featureval_destroy (feats);
gr_seg_destroy (seg);
return false;
......
......@@ -903,8 +903,7 @@ retry:
FAIL ("ScriptShapeOpenType() set fNoGlyphIndex");
if (unlikely (hr == E_OUTOFMEMORY))
{
buffer->ensure (buffer->allocated * 2);
if (unlikely (buffer->in_error))
if (unlikely (!buffer->ensure (buffer->allocated * 2)))
FAIL ("Buffer resize failed");
goto retry;
}
......@@ -973,8 +972,7 @@ retry:
#undef utf16_index
buffer->ensure (glyphs_len);
if (unlikely (buffer->in_error))
if (unlikely (!buffer->ensure (glyphs_len)))
FAIL ("Buffer in error");
#undef FAIL
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册