]> git.wh0rd.org - fontconfig.git/blobdiff - fc-glyphname/fc-glyphname.c
rehash increment could be zero, causing rehash infinite loop.
[fontconfig.git] / fc-glyphname / fc-glyphname.c
index 4d250e0086102a903cb959b92151383750199a84..d4d0b990155808f327da73cb578c85c62c29959b 100644 (file)
 
 #include "fcint.h"
 
-/* stub definitions for declarations from fcint.h.. */
-int * _fcBankId = 0, * _fcBankIdx = 0;
-
-int
-FcCacheBankToIndexMTF (int bank)
-{
-    return 0;
-}
-/* end stub definitions */
-
 static int
 rawindex (const FcGlyphName *gn);
 
@@ -216,7 +206,7 @@ insert (FcGlyphName *gn, FcGlyphName **table, FcChar32 h)
     i = (int) (h % hash);
     while (table[i])
     {
-       if (!r) r = (int) (h % rehash);
+       if (!r) r = (int) (h % rehash + 1);
        i += r;
        if (i >= hash)
            i -= hash;