From ed79961b7a27c03eae6fc8953406ce4ee45d8729 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Tue, 3 Jun 2014 16:26:25 +0000 Subject: Potential fix for htshash.c:330 assertion failure: "error invalidating hash entry" --- src/htscore.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/htscore.c') diff --git a/src/htscore.c b/src/htscore.c index 08e3902..b7cd1b3 100644 --- a/src/htscore.c +++ b/src/htscore.c @@ -419,6 +419,12 @@ int hts_record_link(httrackp * opt, return success; } +void hts_invalidate_link(httrackp * opt, int lpos) { + /* devalidate entry */ + opt->liens[lpos]->pass2 = -1; +} + + #define HT_INDEX_END do { \ if (!makeindex_done) { \ if (makeindex_fp) { \ @@ -2499,7 +2505,7 @@ void host_ban(httrackp * opt, int ptr, if (strfield2(jump_identification(heap(i)->adr), host)) { // host hts_log_print(opt, LOG_DEBUG, "Cancel: %s%s", heap(i)->adr, heap(i)->fil); - hash_invalidate_entry(opt->hash, i); // invalidate hashtable entry + hts_invalidate_link(opt, i); // invalidate hashtable entry // on efface pas le hash, because si on rencontre le lien, reverif sav.. } } else { -- cgit v1.2.3