This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv_force_normal: Don’t confuse regexps with cows
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 6e8ed66..3736e27 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4797,7 +4797,7 @@ Perl_sv_force_normal_flags(pTHX_ register SV *const sv, const U32 flags)
     }
 #else
     if (SvREADONLY(sv)) {
-       if (SvFAKE(sv) && !isGV_with_GP(sv)) {
+       if (SvIsCOW(sv)) {
            const char * const pvx = SvPVX_const(sv);
            const STRLEN len = SvCUR(sv);
            SvFAKE_off(sv);