From: Ralph Ronnquist Date: Fri, 8 Jul 2022 01:11:17 +0000 (+1000) Subject: fixing "hashvector_next" X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;ds=inline;h=c94b62d99f7e3a9ef61ab5cf0f4d7a874e8d2dd4;p=rrq%2Frrqmisc.git fixing "hashvector_next" --- diff --git a/vector/hashvector.c b/vector/hashvector.c index 4d89890..b39ef5e 100644 --- a/vector/hashvector.c +++ b/vector/hashvector.c @@ -61,12 +61,12 @@ static void **hashvector_find_slot( void *hashvector_next(hashvector *hv,vector_index *index,void *key) { unsigned long i = index? *index : 0; for ( ; i < hv->table.size; i++ ) { - void **p = hashvector_find_slot( hv, key, &i, 0 ); + void **p = vector_next_used( &hv->table, &i ); if ( p == 0 ) { break; } if ( *p && *p != HV_HOLE ) { - if ( key && hv->type->haskey( hv->type, key, *p ) == 0 ) { + if ( key && hv->type->haskey( hv->type, *p, key ) == 0 ) { continue; } if ( index ) {