rehash increment could be zero, causing rehash infinite loop.

Bump the rehash value by one so that it is always positive.
This commit is contained in:
Keith Packard 2007-03-12 10:30:51 -07:00
parent 9b74b78fe8
commit fa741cd4ff
1 changed files with 1 additions and 1 deletions

View File

@ -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;