From 722e8b857eafc52e07dee5d9b253b88ed5c5c8ed Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 21 Feb 2013 15:37:51 -0500 Subject: [PATCH] Fixup previous commit Was not decreasing num_items. Ouch! --- src/hb-ot-layout-gsubgpos-private.hh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 5f5000b72..23fbdf489 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -420,7 +420,9 @@ struct hb_apply_context_t continue; matcher_t::may_match_t match = matcher.may_match (info, match_glyph_data); - if (unlikely (match == matcher_t::MATCH_YES)) + if (match == matcher_t::MATCH_YES || + (match == matcher_t::MATCH_MAYBE && + skip == matcher_t::SKIP_NO)) { num_items--; match_glyph_data++; @@ -428,7 +430,7 @@ struct hb_apply_context_t } if (skip == matcher_t::SKIP_NO) - return match == matcher_t::MATCH_MAYBE ? true : false; + return false; } return false; } @@ -493,7 +495,9 @@ struct hb_apply_context_t continue; matcher_t::may_match_t match = matcher.may_match (info, match_glyph_data); - if (unlikely (match == matcher_t::MATCH_YES)) + if (match == matcher_t::MATCH_YES || + (match == matcher_t::MATCH_MAYBE && + skip == matcher_t::SKIP_NO)) { num_items--; match_glyph_data++; @@ -501,7 +505,7 @@ struct hb_apply_context_t } if (skip == matcher_t::SKIP_NO) - return match == matcher_t::MATCH_MAYBE ? true : false; + return false; } return false; }