(setup_lookup_flags): Fix previous change.
authorhanda <handa>
Tue, 24 Nov 2009 05:57:06 +0000 (05:57 +0000)
committerhanda <handa>
Tue, 24 Nov 2009 05:57:06 +0000 (05:57 +0000)
src/otfdrive.c

index 0139011..93c7062 100644 (file)
@@ -241,7 +241,7 @@ setup_lookup_flags (OTF_LookupList *LookupList, OTF_FeatureList *FeatureList,
                {
                  feature = FeatureList->Feature + index;
                  for (j = 0; j < feature->LookupCount; j++)
-                   lookup_flags[feature->LookupListIndex[j]] = i + 1;
+                   lookup_flags[feature->LookupListIndex[j]] = index + 1;
                }
            }
          break;
@@ -259,14 +259,16 @@ setup_lookup_flags (OTF_LookupList *LookupList, OTF_FeatureList *FeatureList,
       tag = OTF_tag (tagname);
       for (i = 0; i < LangSys->FeatureCount; i++)
        {
-         feature = FeatureList->Feature + LangSys->FeatureIndex[i];
+         int index = LangSys->FeatureIndex[i];
+
+         feature = FeatureList->Feature + index;
          if (tag == feature->FeatureTag)
            {
              if (feature_table[i])
                break;
              if (use_it > 0)
                for (j = 0; j < feature->LookupCount; j++)
-                 lookup_flags[feature->LookupListIndex[j]] = j + 1;
+                 lookup_flags[feature->LookupListIndex[j]] = index + 1;
              feature_table[i] = use_it;
              break;
            }