diff options
Diffstat (limited to 'doop.c')
-rw-r--r-- | doop.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1197,6 +1197,8 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) rsave = rc = SvPV_nomg_const(right, rightlen); len = leftlen < rightlen ? leftlen : rightlen; lensave = len; + SvCUR_set(sv, len); + (void)SvPOK_only(sv); if ((left_utf || right_utf) && (sv == left || sv == right)) { needlen = optype == OP_BIT_AND ? len : leftlen + rightlen; Newxz(dc, needlen + 1, char); @@ -1217,8 +1219,6 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) sv_usepvn_flags(sv, dc, needlen, SV_HAS_TRAILING_NUL); dc = SvPVX(sv); /* sv_usepvn() calls Renew() */ } - SvCUR_set(sv, len); - (void)SvPOK_only(sv); if (left_utf || right_utf) { UV duc, luc, ruc; char *dcorig = dc; |