diff options
author | Spider Boardman <spider@orb.nashua.nh.us> | 2000-09-14 13:09:36 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-09-14 21:20:09 +0000 |
commit | 9f9ab9055319ce9b1a2b147cb13f3474dcc9c3b7 (patch) | |
tree | 5264554c9bca1d57d9abafd0939373ff9853a90a /utf8.c | |
parent | 3282e3a65f9bcf8c13ecb7e0f06da5d5fb020fef (diff) | |
download | perl-9f9ab9055319ce9b1a2b147cb13f3474dcc9c3b7.tar.gz |
Replace #7084 with
Subject: Re: perl@7078
Message-Id: <200009142109.RAA03425@leggy.zk3.dec.com>
p4raw-id: //depot/perl@7085
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -299,7 +299,8 @@ Perl_utf8_to_bytes(pTHX_ U8* s, STRLEN *len) /* ensure valid UTF8 and chars < 256 before updating string */ while (s < send) { U8 c = *s++; - if ( (s >= send) || (*s & 0x80 && c > 0xc3)) { + if (c >= 0x80 && + ( (s >= send) || ((*s++ & 0xc0) != 0x80) || ((c & 0xfe) != 0xc2))) { *len = -1; return 0; } |