]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccharset.c
Charset hashing depended on uniqueness of leaves.
[fontconfig.git] / src / fccharset.c
index 1c2e2eac155a2c8287d15d8e3527b2253a86a13a..5da131283d07f17991fbe361c239511282dd9a61 100644 (file)
@@ -1064,8 +1064,8 @@ FcCharSetHash (FcCharSet *fcs)
     int                i;
 
     /* hash in leaves */
-    for (i = 0; i < fcs->num * (int) (sizeof (FcCharLeaf *) / sizeof (FcChar32)); i++)
-       hash = ((hash << 1) | (hash >> 31)) ^ (FcChar32)(FcCharSetLeaf(fcs, i)->map);
+    for (i = 0; i < fcs->num; i++)
+       hash = ((hash << 1) | (hash >> 31)) ^ FcCharLeafHash (FcCharSetLeaf(fcs,i));
     /* hash in numbers */
     for (i = 0; i < fcs->num; i++)
        hash = ((hash << 1) | (hash >> 31)) ^ *FcCharSetNumbers(fcs);