From: handa Date: Thu, 17 Feb 2005 12:23:44 +0000 (+0000) Subject: (gstring_subst): Correctly set temp.f.index. X-Git-Tag: REL-0-9-5~84 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5dad0b083ee486f50280326d82030f239df4ef84;p=m17n%2Flibotf.git (gstring_subst): Correctly set temp.f.index. (lookup_gsub): Fix updating gidx. --- diff --git a/src/otfdrive.c b/src/otfdrive.c index 9a528a8..faabc2a 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -85,6 +85,8 @@ gstring_subst (OTF_GlyphString *gstring, int from, int to, int flag, OTF_Glyph temp = *g; memmove (g, g + 1, sizeof (OTF_Glyph) * (non_ignored_idx - i)); + temp.f.index.from = from_idx; + temp.f.index.to = to_idx; gstring->glyphs[non_ignored_idx--] = temp; len--; } @@ -499,7 +501,7 @@ lookup_gsub (OTF_LookupList *lookup_list, unsigned lookup_list_index, continue; gstring_subst (gstring, gidx, gidx + 1 + n, flag, &lig->LigGlyph, 1); - gidx++; + gidx += lig->CompCount; break; } }