Commit 4ff7155f authored by Alexander Larsson's avatar Alexander Larsson Committed by Akira TAGOH

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.
parent fd2ad114
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment