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); i = (int) (h % hash);
while (table[i]) while (table[i])
{ {
if (!r) r = (int) (h % rehash); if (!r) r = (int) (h % rehash + 1);
i += r; i += r;
if (i >= hash) if (i >= hash)
i -= hash; i -= hash;