diff options
author | Alexander Larsson <alexl@redhat.com> | 2018-01-12 16:52:39 +0100 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2018-01-14 15:33:00 +0900 |
commit | 4ff7155f5c96a02f2cd3542e8546c76c632c315a (patch) | |
tree | d6df2d1f92ab76bbdfd61c4ad6a9765790b38f98 /src | |
parent | fd2ad1147ad9565841372e56e6bb939c0f843ac5 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/fchash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fchash.c b/src/fchash.c index ba6a4539..396f452c 100644 --- a/src/fchash.c +++ b/src/fchash.c @@ -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) { |