summaryrefslogtreecommitdiff
path: root/fc-glyphname
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2007-03-12 10:30:51 -0700
committerKeith Packard <keithp@neko.keithp.com>2007-03-12 10:30:51 -0700
commitfa741cd4fffbbaa5d4ba9a15f53550ac7817cc92 (patch)
tree194ac456a0e8ed2ce4a0a205a580cdfd80326987 /fc-glyphname
parent9b74b78fe87f75f7026bfb23ab43ef347e109ca6 (diff)
rehash increment could be zero, causing rehash infinite loop.
Bump the rehash value by one so that it is always positive.
Diffstat (limited to 'fc-glyphname')
-rw-r--r--fc-glyphname/fc-glyphname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fc-glyphname/fc-glyphname.c b/fc-glyphname/fc-glyphname.c
index faaa63b..d4d0b99 100644
--- a/fc-glyphname/fc-glyphname.c
+++ b/fc-glyphname/fc-glyphname.c
@@ -206,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;