From: Jarkko Hietaniemi Date: Sun, 29 Oct 2000 17:02:37 +0000 (+0000) Subject: UTF-8 decoder tweak. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa5452176994532eebece21dc5c8d01fe419c73f;p=p5sagit%2Fp5-mst-13.2.git UTF-8 decoder tweak. p4raw-id: //depot/perl@7481 --- diff --git a/utf8.c b/utf8.c index 80f8846..9ac63a6 100644 --- a/utf8.c +++ b/utf8.c @@ -210,7 +210,7 @@ Perl_utf8_to_uv(pTHX_ U8* s, STRLEN curlen, STRLEN* retlen, U32 flags) goto malformed; } - if ((uv >= 0xc0 && uv <= 0xfd && s[1] < 0x80) && + if ((uv >= 0xc0 && uv <= 0xfd && curlen >1 && s[1] < 0x80) && !(flags & UTF8_ALLOW_NON_CONTINUATION)) { if (dowarn) Perl_warner(aTHX_ WARN_UTF8,