Fixed loop val
authorPekka Riikonen <priikone@silcnet.org>
Mon, 3 Mar 2003 21:41:08 +0000 (21:41 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 3 Mar 2003 21:41:08 +0000 (21:41 +0000)
lib/silcutil/silchashtable.c

index 696a0220f4c331744216bf9330a3f326276b8b07..a0c0aefd938b9c0d68245bcfa3d98abc312e4304 100644 (file)
@@ -91,7 +91,7 @@ static SilcUInt32 silc_hash_table_primesize(SilcUInt32 size, SilcUInt32 *index)
 {
   int i;
 
-  for (i = 0; i < sizeof(primesize); i++)
+  for (i = 0; i < sizeof(primesize) / sizeof(primesize[0]); i++)
     if (primesize[i] >= size) {
       *index = i;
       SILC_HT_DEBUG(("sizeof of the hash table is %d", primesize[*index]));