From 0275695d1988c47451524fc91008f8f924d95ad5 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sun, 15 Aug 2004 05:48:05 +0000 Subject: [PATCH] Make sure we create a reasonable large array...and avoid =0 case --- Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc b/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc index fef3507..67dc413 100755 --- a/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc +++ b/Repair/RepairCompiler/MCC/Runtime/SimpleHash.cc @@ -334,7 +334,7 @@ int SimpleHash::count(int key) { } SimpleHash * SimpleHash::imageSet(int key) { - SimpleHash * newset=new SimpleHash(count(key)); + SimpleHash * newset=new SimpleHash(2*count(key)+4); unsigned int hashkey = (unsigned int)key % size; struct SimpleNode *ptr = bucket[hashkey]; -- 2.34.1