summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 14261a7481..6e60737179 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -5209,7 +5209,9 @@ Perl_re_op_compile(pTHX_ SV * const * const patternp, int pat_count,
xend = exp + plen;
}
else {
- exp = (char*)Perl_bytes_to_utf8(aTHX_ (U8*)SvPV(pat, plen), &len);
+ exp = (char*)Perl_bytes_to_utf8(aTHX_
+ (U8*)SvPV_nomg(pat, plen),
+ &len);
xend = exp + len;
SAVEFREEPV(exp);
}