summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index 5972724410..bf08761d43 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1339,9 +1339,8 @@ Perl_pregcomp(pTHX_ char *exp, char *xend, PMOP *pm)
if (exp == NULL)
FAIL("NULL regexp argument");
- if (PL_curcop == &PL_compiling ? (PL_hints & HINT_UTF8) : IN_UTF8) {
+ if (pm->op_pmdynflags & PMdf_UTF8) {
PL_reg_flags |= RF_utf8;
- pm->op_pmdynflags |= PMdf_UTF8;
}
else
PL_reg_flags = 0;