We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65ac759 commit 3777a0aCopy full SHA for 3777a0a
pp.c
@@ -6045,11 +6045,15 @@ PP(pp_split)
6045
}
6046
else {
6047
if (!AvREAL(ary)) {
6048
- I32 i;
6049
AvREAL_on(ary);
6050
AvREIFY_off(ary);
6051
- for (i = AvFILLp(ary); i >= 0; i--)
6052
- AvARRAY(ary)[i] = &PL_sv_undef; /* don't free mere refs */
+
+ /* Note: the above av_clear(ary) above should */
+ /* have set AvFILLp(ary) = -1, so this Zero() */
6053
+ /* may well be superfluous. */
6054
6055
+ /* don't free mere refs */
6056
+ Zero(AvARRAY(ary), AvFILLp(ary) + 1, SV*);
6057
6058
/* temporarily switch stacks */
6059
SAVESWITCHSTACK(PL_curstack, ary);
0 commit comments