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);
|
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;
|
||||||
|
|
Loading…
Reference in New Issue