From f8d4301e9fa4f3709258505941e37fab2eadadc6 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 23 Apr 2007 08:01:36 +0000 Subject: Fixed a major bug in the rehash algorithm. If any items were erased, then a rehash occured, a double-free would also occur...very sad. That's all fixed now. --- src/hash.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hash.h b/src/hash.h index e819379..a21d651 100644 --- a/src/hash.h +++ b/src/hash.h @@ -641,7 +641,8 @@ protected: // Delete all of the old data for( uint32_t j = 0; j < nOldCapacity; j++ ) { - if( (bOldFilled[j/32]&(1<<(j%32)))!=0 ) + if( (bOldFilled[j/32]&(1<<(j%32)))!=0 && + (bOldDeleted[j/32]&(1<<(j%32)))==0 ) { va.destroy( &aOldValues[j] ); ka.destroy( &aOldKeys[j] ); -- cgit v1.2.3