From 678785ff8211b85fb1b2020e37c8f2bfa50e6119 Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 24 Nov 2009 05:57:06 +0000 Subject: [PATCH] (setup_lookup_flags): Fix previous change. --- src/otfdrive.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/otfdrive.c b/src/otfdrive.c index 0139011..93c7062 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -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; } -- 1.7.10.4