summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2003-10-14 18:45:39 +0000
committerNicholas Clark <nick@ccl4.org>2003-10-14 18:45:39 +0000
commit5355f3c7126474078b6e199097ac1d1343f2fdb1 (patch)
tree4e419f2a3c761343e77ec1b4d0c75896068971a0 /hv.c
parent5a8cac993f5e531fd4379cb91dafffa00baacb2d (diff)
downloadperl-5355f3c7126474078b6e199097ac1d1343f2fdb1.tar.gz
Duplicate 19423 (pathological hashes too easy) into hv_store_ent
(the routine used by perl level HV operations) p4raw-id: //depot/perl@21446
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hv.c b/hv.c
index 63e112a99e..5e2a3853a9 100644
--- a/hv.c
+++ b/hv.c
@@ -871,8 +871,8 @@ Perl_hv_store_ent(pTHX_ HV *hv, SV *keysv, SV *val, U32 hash)
xhv->xhv_keys++; /* HvKEYS(hv)++ */
if (i) { /* initial entry? */
xhv->xhv_fill++; /* HvFILL(hv)++ */
- if (xhv->xhv_keys > (IV)xhv->xhv_max /* HvKEYS(hv) > HvMAX(hv) */)
- hsplit(hv);
+ } else if (xhv->xhv_keys > (IV)xhv->xhv_max /* HvKEYS(hv) > HvMAX(hv) */) {
+ hsplit(hv);
}
return entry;