From 9550a8c4e8b4e28be60d38c27d59253846ff9569 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 25 Jul 2012 19:22:57 -0400 Subject: [PATCH] [hb-old] Fixup not-enough-space handling --- src/hb-old.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/hb-old.cc b/src/hb-old.cc index e828ca8..be0187f 100644 --- a/src/hb-old.cc +++ b/src/hb-old.cc @@ -329,14 +329,15 @@ retry: #undef ALLOCATE_ARRAY if (!HB_ShapeItem (&item)) - return false; - - if (unlikely (item.num_glyphs > num_glyphs)) { - buffer->ensure (buffer->allocated * 2); - if (buffer->in_error) - FAIL ("Buffer resize failed"); - goto retry; + if (unlikely (item.num_glyphs > num_glyphs)) + { + buffer->ensure (buffer->allocated * 2); + if (buffer->in_error) + FAIL ("Buffer resize failed"); + goto retry; + } + return false; } num_glyphs = item.num_glyphs; -- 2.7.4