From 35e3fcec9332ff096ebcbab5403af999f01a4690 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 27 Jun 2017 16:09:26 +0200 Subject: Distinguish hash slot overwrite cases. --- source/fitz/hash.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/fitz') diff --git a/source/fitz/hash.c b/source/fitz/hash.c index fa7ce93f..af95ba9c 100644 --- a/source/fitz/hash.c +++ b/source/fitz/hash.c @@ -121,7 +121,10 @@ do_hash_insert(fz_context *ctx, fz_hash_table *table, const void *key, void *val if (memcmp(key, ents[pos].key, table->keylen) == 0) { /* This is legal, but should rarely happen. */ - fz_warn(ctx, "assert: overwrite hash slot"); + if (val != ents[pos].val) + fz_warn(ctx, "assert: overwrite hash slot with different value!"); + else + fz_warn(ctx, "assert: overwrite hash slot with same value"); return ents[pos].val; } -- cgit v1.2.3