From: Ralph Ronnquist Date: Sat, 25 Jun 2022 22:53:40 +0000 (+1000) Subject: correction for deleting items X-Git-Tag: 0.1~17 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=f78bdf5872a5a3dd96e26f94173d272e0227b785;p=rrq%2Frrqmisc.git correction for deleting items --- diff --git a/pvector/hashvector.c b/pvector/hashvector.c index 5164ffe..11fdae8 100644 --- a/pvector/hashvector.c +++ b/pvector/hashvector.c @@ -105,8 +105,9 @@ int hashvector_delete(hashvector *hv,void *item) { } *p = HV_HOLE; hv->holes++; + hv->fill--; if ( hv->table.size > 256 ) { - if ( hv->fill < hv->table.size / 2 ) { + if ( hv->fill < hv->table.size / 4 ) { hashvector_resize( hv, hv->table.size / 2 ); } }