summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-08-25 11:19:44 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-08-25 12:12:36 -0700
commit428ccf1e2d78d72b07c5e959e967569a82ce07ba (patch)
treebc3560710c97e979b53b0673fc600123c13bccd0 /pp.c
parent81f1be6bb8eb67a788a425cf57b503acc24676a5 (diff)
downloadperl-428ccf1e2d78d72b07c5e959e967569a82ce07ba.tar.gz
Don’t push nulls on to the stack in pp_padav
This is something that ce0d59fdd1c missed. This will probably fix most of the modules mentioned in ticket #119433.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 56d63f39c5..46294b3d5c 100644
--- a/pp.c
+++ b/pp.c
@@ -98,7 +98,11 @@ PP(pp_padav)
}
}
else {
- Copy(AvARRAY((const AV *)TARG), SP+1, maxarg, SV*);
+ PADOFFSET i;
+ for (i=0; i < (PADOFFSET)maxarg; i++) {
+ SV * const sv = AvARRAY((const AV *)TARG)[i];
+ SP[i+1] = sv ? sv : &PL_sv_undef;
+ }
}
SP += maxarg;
}