summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pp_hot.c b/pp_hot.c
index d8b1976a23..e48a010554 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -964,6 +964,13 @@ nope:
++BmUSEFUL(pm->op_pmshort);
ret_no:
+ if (global && !(pm->op_pmflags & PMf_CONTINUE)) {
+ if (SvTYPE(TARG) >= SVt_PVMG && SvMAGIC(TARG)) {
+ MAGIC* mg = mg_find(TARG, 'g');
+ if (mg)
+ mg->mg_len = -1;
+ }
+ }
LEAVE_SCOPE(oldsave);
if (gimme == G_ARRAY)
RETURN;