summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 6aa29e117b..16f159c603 100644
--- a/sv.c
+++ b/sv.c
@@ -13568,7 +13568,14 @@ S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
? NULL
: gv_dup(CvGV(sstr), param);
- CvPADLIST(dstr) = padlist_dup(CvPADLIST(sstr), param);
+ if (!CvISXSUB(sstr)) {
+ if(CvPADLIST(sstr))
+ CvPADLIST_set(dstr, padlist_dup(CvPADLIST(sstr), param));
+ else
+ CvPADLIST_set(dstr, NULL);
+ } else { /* future union here */
+ CvRESERVED(dstr) = NULL;
+ }
CvOUTSIDE(dstr) =
CvWEAKOUTSIDE(sstr)
? cv_dup( CvOUTSIDE(dstr), param)