+2008-10-17 Kenichi Handa <handa@m17n.org>
+
+ * ftfont.c (ftfont_otf_features): Fix indexing
+ gsub_gpos->FeatureList.Feature. Check the validity of indices.
+
2008-10-16 Magnus Henoch <mange@freemail.hu>
* dbusbind.c (Fdbus_call_method): Unbreak usage line.
OTF_GSUB_GPOS *gsub_gpos;
{
Lisp_Object scripts, langsyses, features, sym;
- int i, j, k;
+ int i, j, k, l;
for (scripts = Qnil, i = gsub_gpos->ScriptList.ScriptCount - 1; i >= 0; i--)
{
for (features = Qnil, k = otf_langsys->FeatureCount - 1; k >= 0; k--)
{
- OTF_TAG_SYM (sym, gsub_gpos->FeatureList.Feature[k].FeatureTag);
+ l = otf_langsys->FeatureIndex[k];
+ if (l > gsub_gpos->FeatureList.FeatureCount)
+ continue;
+ OTF_TAG_SYM (sym, gsub_gpos->FeatureList.Feature[l].FeatureTag);
features = Fcons (sym, features);
}
if (j >= 0)