diff options
author | Andy Lester <andy@petdance.com> | 2005-10-13 11:42:12 -0500 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2005-10-13 23:03:46 +0000 |
commit | 551405c409d33bc8cd0a20177c4ee21a204d18b5 (patch) | |
tree | 42d3d3344712d171624bc4d793b87f019234bba4 /utf8.c | |
parent | b1681ed3d2d7fce28f676043b07816f4fad94f55 (diff) | |
download | perl-551405c409d33bc8cd0a20177c4ee21a204d18b5.tar.gz |
Stas' croak patch and then some
Message-ID: <20051013214212.GA1122@petdance.com>
p4raw-id: //depot/perl@25754
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -560,10 +560,12 @@ malformed: if (s == s0) Perl_sv_catpvf(aTHX_ sv, "(unexpected non-continuation byte 0x%02"UVxf", immediately after start byte 0x%02"UVxf")", (UV)s[1], startbyte); - else + else { + const int len = (int)(s-s0); Perl_sv_catpvf(aTHX_ sv, "(unexpected non-continuation byte 0x%02"UVxf", %d byte%s after start byte 0x%02"UVxf", expected %d bytes)", - (UV)s[1], s - s0, s - s0 > 1 ? "s" : "", startbyte, (int)expectlen); - + (UV)s[1], len, len > 1 ? "s" : "", startbyte, (int)expectlen); + } + break; case UTF8_WARN_FE_FF: Perl_sv_catpvf(aTHX_ sv, "(byte 0x%02"UVxf")", uv); |