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:
parent
9b74b78fe8
commit
fa741cd4ff
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue