summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorSADAHIRO Tomoyuki <BQW10602@nifty.com>2005-07-17 07:05:13 +0900
committerH.Merijn Brand <h.m.brand@xs4all.nl>2005-07-16 13:20:09 +0000
commitace7757b19d04728dc05eefe7b371b14d8ce29dd (patch)
tree4b5300a37a060fa3a29469ec39fd729d7a58e0b8 /doop.c
parentc4aca7d03737ddcac23de1ad6d597e98be679214 (diff)
downloadperl-ace7757b19d04728dc05eefe7b371b14d8ce29dd.tar.gz
Re: [perl #36569] chop fails on decoded string with trailing nul
Message-Id: <20050716220041.2BDD.BQW10602@nifty.com> p4raw-id: //depot/perl@25158
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/doop.c b/doop.c
index 27c3248654..a36a04f196 100644
--- a/doop.c
+++ b/doop.c
@@ -977,7 +977,7 @@ Perl_do_chop(pTHX_ register SV *astr, register SV *sv)
s = send - 1;
while (s > start && UTF8_IS_CONTINUATION(*s))
s--;
- if (utf8_to_uvchr((U8*)s, 0)) {
+ if (is_utf8_string((U8*)s, send - s)) {
sv_setpvn(astr, s, send - s);
*s = '\0';
SvCUR_set(sv, s - start);