bug fix for hashtable resize
[rrq/rrqnet.git] / 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;
        }
     }