diff options
Diffstat (limited to 'src/hash.c')
-rw-r--r-- | src/hash.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hash.c b/src/hash.c index 96f41361b..8ec043f11 100644 --- a/src/hash.c +++ b/src/hash.c @@ -97,7 +97,7 @@ static void insertElement( } -/* Resize the hash table so that it cantains "new_size" buckets. +/* Resize the hash table so that it contains "new_size" buckets. ** ** The hash table might fail to resize if sqlite3_malloc() fails or ** if the new size is the same as the prior size. @@ -166,12 +166,13 @@ static HashElem *findElementWithHash( count = pH->count; } if( pHash ) *pHash = h; - while( count-- ){ + while( count ){ assert( elem!=0 ); if( sqlite3StrICmp(elem->pKey,pKey)==0 ){ return elem; } elem = elem->next; + count--; } return &nullElement; } |