diff options
Diffstat (limited to 'fontconfig/src/fcmatch.c')
-rw-r--r-- | fontconfig/src/fcmatch.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c index 627aa1a16..93e013f9b 100644 --- a/fontconfig/src/fcmatch.c +++ b/fontconfig/src/fcmatch.c @@ -743,6 +743,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr { FcBool ret = FcFalse; FcCharSet *cs; + int i; cs = 0; if (trim || csp) @@ -752,7 +753,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr goto bail; } - while (nnode--) + for (i = 0; i < nnode; i++) { FcSortNode *node = *n++; FcBool adds_chars = FcFalse; @@ -776,7 +777,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **csp, FcBool tr * If this font isn't a subset of the previous fonts, * add it to the list */ - if (!trim || adds_chars) + if (!i || !trim || adds_chars) { FcPatternReference (node->pattern); if (FcDebug () & FC_DBG_MATCHV) |