]> git.wh0rd.org - fontconfig.git/commitdiff
Fix conf.d directory sorting.
authorKeith Packard <keithp@neko.keithp.com>
Sun, 10 Sep 2006 04:21:01 +0000 (21:21 -0700)
committerKeith Packard <keithp@neko.keithp.com>
Sun, 10 Sep 2006 04:21:01 +0000 (21:21 -0700)
Sort was using broken comparison function.

src/fcxml.c

index 4087183372a5f4665ba15a910b03e37e36030a20..a9453ebc0b01b31187320bcd5b08057836affe86 100644 (file)
@@ -2281,6 +2281,14 @@ FcEndDoctypeDecl (void *userData)
 
 #endif /* ENABLE_LIBXML2 */
 
+static int
+FcSortCmpStr (const void *a, const void *b)
+{
+    const FcChar8    *as = *((FcChar8 **) a);
+    const FcChar8    *bs = *((FcChar8 **) b);
+    return FcStrCmp (as, bs);
+}
+
 static FcBool
 FcConfigParseAndLoadDir (FcConfig      *config,
                         const FcChar8  *name,
@@ -2350,7 +2358,7 @@ FcConfigParseAndLoadDir (FcConfig *config,
     {
        int i;
        qsort (files->strs, files->num, sizeof (FcChar8 *), 
-              (int (*)(const void *, const void *)) FcStrCmp);
+              (int (*)(const void *, const void *)) FcSortCmpStr);
        for (i = 0; ret && i < files->num; i++)
            ret = FcConfigParseAndLoad (config, files->strs[i], complain);
     }