diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2006-10-20 10:06:57 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2006-10-20 10:06:57 +0000 |
commit | 4978b1831a24ff36fc8bea075526005cdf40e132 (patch) | |
tree | 37c9c1e7504a3fbe2395fdfb3f7123f416defb26 /mg.c | |
parent | 664e119dc7d588fadda4e2290471766a53190667 (diff) | |
download | perl-4978b1831a24ff36fc8bea075526005cdf40e132.tar.gz |
zero length $1 took too long to detect utf8-ness
p4raw-id: //depot/perl@29059
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -861,7 +861,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) TAINT_NOT; sv_setpvn(sv, s, i); PL_tainted = oldtainted; - if (RX_MATCH_UTF8(rx) && is_utf8_string((U8*)s, i)) + if (RX_MATCH_UTF8(rx) && (!i || is_utf8_string((U8*)s, i))) SvUTF8_on(sv); else SvUTF8_off(sv); |