summaryrefslogtreecommitdiff
path: root/tables
diff options
context:
space:
mode:
authorfanf <fanf@13f79535-47bb-0310-9956-ffa450edef68>2000-11-08 00:54:23 +0000
committerfanf <fanf@13f79535-47bb-0310-9956-ffa450edef68>2000-11-08 00:54:23 +0000
commit0841f403f94664b3007df931a363c6584e7c8ab4 (patch)
tree6d18c86c8234355fe024ce8ccf0d288bd0a876c4 /tables
parent17a3882ace13e04742d9022ec3893add07b042d6 (diff)
downloadlibapr-0841f403f94664b3007df931a363c6584e7c8ab4.tar.gz
Use the right index into the new array whan resizing the hash table.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60643 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables')
-rw-r--r--tables/apr_hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tables/apr_hash.c b/tables/apr_hash.c
index d0c9f01de..f8ab43fa2 100644
--- a/tables/apr_hash.c
+++ b/tables/apr_hash.c
@@ -191,7 +191,7 @@ static void expand_array(apr_hash_t *ht)
new_max = ht->max * 2 + 1;
new_array = alloc_array(ht, new_max);
for (hi = apr_hash_first(ht); hi; hi = apr_hash_next(hi)) {
- i = hi->this->hash & ht->max;
+ i = hi->this->hash & new_max;
hi->this->next = new_array[i];
new_array[i] = hi->this;
}