This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix off-by-one error in e92c6be8349ad1d36d6df1dcb526fd37421e9970.
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 0a27e1a..89825c6 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -12255,8 +12255,8 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
        PL_tmps_max             = proto_perl->Itmps_max;
        PL_tmps_floor           = proto_perl->Itmps_floor;
        Newx(PL_tmps_stack, PL_tmps_max, SV*);
-       sv_dup_inc_multiple(proto_perl->Itmps_stack, PL_tmps_stack, PL_tmps_ix,
-                           param);
+       sv_dup_inc_multiple(proto_perl->Itmps_stack, PL_tmps_stack,
+                           PL_tmps_ix+1, param);
 
        /* next PUSHMARK() sets *(PL_markstack_ptr+1) */
        i = proto_perl->Imarkstack_max - proto_perl->Imarkstack;