bug fix for hashtable resize
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 16 Oct 2021 10:42:27 +0000 (21:42 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 16 Oct 2021 10:42:27 +0000 (21:42 +1100)
htable.c

index 02f08e9dd1820c9977db4cb4010c23ed44e79abc..caed606314eba7ae030ec31466c0c8d034d8d1ce 100644 (file)
--- a/htable.c
+++ b/htable.c
@@ -87,7 +87,7 @@ static unsigned char *htnext(htable *table,int *i) {
     unsigned char **e = table->data + table->size;
     for ( ; p < e; p++ ) {
        (*i) += 1;
-       if ( *p != 0 || *p != (unsigned char*)1 ) {
+       if ( *p != 0 && *p != (unsigned char*)1 ) {
            return *p;
        }
     }