From: Behdad Esfahbod Date: Mon, 21 Sep 2009 17:43:54 +0000 (-0400) Subject: [HB] Fix apply_lookup() loop X-Git-Tag: submit/2.0alpha-wayland/20121130.004132~9^2~970 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9c0a2dad09cd168fb28cdee09b4303f307ea56d;p=profile%2Fivi%2Forg.tizen.video-player.git [HB] Fix apply_lookup() loop Part of Bug 595539 - Regressions in rendering certain Thai sequences with OpenType font --- diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index e96e4e3..fd9c783 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -219,7 +219,7 @@ static inline bool apply_lookup (APPLY_ARG_DEF, /* TODO We don't support lookupRecord arrays that are not increasing: * Should be easy for in_place ones at least. */ - for (unsigned int i = 0; i < count; i++) + for (unsigned int i = 0; i < count; /* NOP */) { while (_hb_ot_layout_skip_mark (context->face, IN_CURINFO (), lookup_flag, NULL)) { @@ -238,6 +238,7 @@ static inline bool apply_lookup (APPLY_ARG_DEF, lookupRecord++; lookupCount--; + /* Err, this is wrong if the lookup jumped over some glyphs */ i += buffer->in_pos - old_pos; if (HB_UNLIKELY (buffer->in_pos == end)) return true;