From: Dave Mitchell Date: Fri, 1 Aug 2003 01:16:31 +0000 (+0100) Subject: Re: utf8+regex bug in 5.8.1-RC2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6b43b21664ab964e1ebd0bc1810512bd8e137c12;p=p5sagit%2Fp5-mst-13.2.git Re: utf8+regex bug in 5.8.1-RC2 Message-ID: <20030801001631.GA11233@fdgroup.com> p4raw-id: //depot/perl@20405 --- diff --git a/regcomp.c b/regcomp.c index 3b69817..dedcd00 100644 --- a/regcomp.c +++ b/regcomp.c @@ -472,7 +472,7 @@ S_scan_commit(pTHX_ RExC_state_t *pRExC_state, scan_data_t *data) STRLEN old_l = CHR_SVLEN(*data->longest); if ((l >= old_l) && ((l > old_l) || (data->flags & SF_BEFORE_EOL))) { - sv_setsv(*data->longest, data->last_found); + SvSetMagicSV(*data->longest, data->last_found); if (*data->longest == data->longest_fixed) { data->offset_fixed = l ? data->last_start_min : data->pos_min; if (data->flags & SF_BEFORE_EOL) diff --git a/t/op/pat.t b/t/op/pat.t index 1e7eaf7..d606a6a 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..1007\n"; +print "1..1008\n"; BEGIN { chdir 't' if -d 't'; @@ -3194,4 +3194,6 @@ $_="abcdef\n"; @x = m/./g; ok("abcde" eq "$`", '# TODO #19049 - global match not setting $`'); -# last test 1007 +ok("123\x{100}" =~ /^.*1.*23\x{100}$/, 'uft8 + multiple floating substr'); + +# last test 1008