Permalink
Browse files

Fix a thinko introduced in c852d95

When checking for lookup type in feature block, stop at feature limit
not a non-existing lookup limit; I blindly copy pasted that block of
code. This was causing all features to be of multiple substitution type
if one of them has a multiple substitution.
  • Loading branch information...
1 parent c803a98 commit 9ba23cc0a246e37630ed3cfc3ff919debe73d88a @khaledhosny khaledhosny committed with JoesCat Apr 26, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 fontforge/featurefile.c
View
@@ -5384,15 +5384,15 @@ return;
/* multiples */
/* Another approach would be to make two lookups, but this is easier... */
has_single = has_multiple = false;
- for ( item=tok->sofar ; item!=NULL && item->type!=ft_lookup_start; item=item->next ) {
+ for ( item=tok->sofar ; item!=NULL && item->type!=ft_feat_start; item=item->next ) {
enum otlookup_type cur = fea_LookupTypeFromItem(item);
if ( cur==gsub_multiple )
has_multiple = true;
else if ( cur==gsub_single )
has_single = true;
}
if ( has_multiple && has_single ) {
- for ( item=tok->sofar ; item!=NULL && item->type!=ft_lookup_start; item=item->next ) {
+ for ( item=tok->sofar ; item!=NULL && item->type!=ft_feat_start; item=item->next ) {
enum otlookup_type cur = fea_LookupTypeFromItem(item);
if ( cur==gsub_single )
item->u2.pst->type = pst_multiple;

0 comments on commit 9ba23cc

Please sign in to comment.