This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
hv_max may be a few too many
[perl5.git] / doop.c
diff --git a/doop.c b/doop.c
index 8239c33..702aaf8 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -502,8 +502,7 @@ do_kv(ARGSproto)
        RETURN;
     }
 
-    /* Guess how much room we need.  hv_max may be a few too many.  Oh well. */
-    EXTEND(SP, HvMAX(keys) * (dokeys + dovalues));
+    EXTEND(SP, HvKEYS(keys) * (dokeys + dovalues));
 
     PUTBACK;   /* hv_iternext and hv_iterval might clobber stack_sp */
     while (entry = hv_iternext(keys)) {