fixing "hashvector_next"
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Fri, 8 Jul 2022 01:11:17 +0000 (11:11 +1000)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Fri, 8 Jul 2022 01:11:17 +0000 (11:11 +1000)
vector/hashvector.c

index 4d89890e172b0874deafd6329c29d4625f18d936..b39ef5ed2851168e78b0db7c4806b7ec0570c1cb 100644 (file)
@@ -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 ) {