[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Mon Aug 11 10:43:05 PDT 2014
src/hb-graphite2.cc | 4 ++--
src/hb-uniscribe.cc | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 15c633dd1f412f9ef839d80a8f7af35e7ea48fbc
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Aug 11 13:42:42 2014 -0400
Minor
diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc
index 709aa94..807c330 100644
--- a/src/hb-graphite2.cc
+++ b/src/hb-graphite2.cc
@@ -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;
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index f335351..74ae3a3 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -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
More information about the HarfBuzz
mailing list