FcHashTableAddInternal: Compare against the right key

We were comparing the passed in key with the ready-to-insert key
rather than the key in the hashtable, so if you ever had a hash
conflicts we'll never insert the new item.

https://bugs.freedesktop.org/show_bug.cgi?id=101889
This commit is contained in:
Alexander Larsson 2018-01-12 16:52:39 +01:00 committed by Akira TAGOH
parent fd2ad1147a
commit 4ff7155f5c
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ FcHashTableAddInternal (FcHashTable *table,
for (prev = &table->buckets[hash % FC_HASH_SIZE];
(b = fc_atomic_ptr_get (prev)); prev = &(b->next))
{
if (!table->compare_func (bucket->key, key))
if (!table->compare_func (b->key, key))
{
if (replace)
{