From: Nicholas Clark Date: Tue, 14 Oct 2003 18:45:39 +0000 (+0000) Subject: Duplicate 19423 (pathological hashes too easy) into hv_store_ent X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5355f3c7126474078b6e199097ac1d1343f2fdb1;p=p5sagit%2Fp5-mst-13.2.git Duplicate 19423 (pathological hashes too easy) into hv_store_ent (the routine used by perl level HV operations) p4raw-id: //depot/perl@21446 --- diff --git a/hv.c b/hv.c index 63e112a..5e2a385 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;