This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Disable study() for utf-8 strings
authorYves Orton <demerphq@gmail.com>
Tue, 12 Sep 2006 17:08:55 +0000 (19:08 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 12 Sep 2006 15:51:53 +0000 (15:51 +0000)
Subject: Re: Re: [Fwd: Smoke [5.9.4] 28821 FAIL(XF) OSF1 V5.1 (EV6/4 cpu)]
Message-ID: <9b18b3110609120808jceb84ces55ef29c2f2b73ebc@mail.gmail.com>

p4raw-id: //depot/perl@28827

pp.c

diff --git a/pp.c b/pp.c
index 4c5c815..0c9ef63 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -644,7 +644,7 @@ PP(pp_study)
     }
     s = (unsigned char*)(SvPV(sv, len));
     pos = len;
-    if (pos <= 0 || !SvPOK(sv)) {
+    if (pos <= 0 || !SvPOK(sv) || SvUTF8(sv)) {
        /* No point in studying a zero length string, and not safe to study
           anything that doesn't appear to be a simple scalar (and hence might
           change between now and when the regexp engine runs without our set