pango/opentype/ftxgsub.c (Lookup_ChainContextSubst3) Fix problems where
authorOwen Taylor <otaylor@redhat.com>
Mon, 25 Aug 2003 14:30:12 +0000 (14:30 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 25 Aug 2003 14:30:12 +0000 (14:30 +0000)
Mon Aug 25 10:17:21 2003  Owen Taylor  <otaylor@redhat.com>

        * pango/opentype/ftxgsub.c (Lookup_ChainContextSubst3)
        * pango/opentype/ftxgpos.c (Lookup_ChainContextPos3):
        Fix problems where the coverage wasn't being checked
        for the first input glyph. (#118639, Kailash C. Chowksey)

src/ftxgpos.c
src/ftxgsub.c

index f3ce13c..deebe89 100644 (file)
     s_in     = &in->string[curr_pos];
     ic       = ccpf3->InputCoverage;
 
-    /* Start at 1 because [0] is implied */
-
-    for ( i = 1, j = 1; i < igc; i++, j++ )
+    for ( i = 0, j = 0; i < igc; i++, j++ )
     {
-      while ( CHECK_Property( gdef, s_in[j], flags, &property ) )
+      /* We already called CHECK_Property for s_in[0] */
+      while ( j > 0 && CHECK_Property( gdef, s_in[j], flags, &property ) )
       {
         if ( error && error != TTO_Err_Not_Covered )
           return error;
index d5850f3..d9a77d6 100644 (file)
     s_in     = &in->string[curr_pos];
     ic       = ccsf3->InputCoverage;
 
-    /* Start at 1 because [0] is implied */
-
-    for ( i = 1, j = 1; i < igc; i++, j++ )
+    for ( i = 0, j = 0; i < igc; i++, j++ )
     {
-      while ( CHECK_Property( gdef, s_in[j], flags, &property ) )
+      /* We already called CHECK_Property for s_in[0] */
+      while ( j > 0 && CHECK_Property( gdef, s_in[j], flags, &property ) )
       {
         if ( error && error != TTO_Err_Not_Covered )
           return error;