This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: A byte count should be Size_t, not I32
authorKarl Williamson <khw@cpan.org>
Mon, 5 Jun 2017 18:24:39 +0000 (12:24 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 8 Jun 2017 17:04:43 +0000 (11:04 -0600)
(or STRLEN.  I thought we were converting to Size_t, so that's what I
chose here.)

utf8.c

diff --git a/utf8.c b/utf8.c
index 39df019..3ded4a6 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -1981,7 +1981,7 @@ Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8)
     U8 *d;
     const U8 *start = s;
     const U8 *send;
     U8 *d;
     const U8 *start = s;
     const U8 *send;
-    I32 count = 0;
+    Size_t count = 0;
 
     PERL_ARGS_ASSERT_BYTES_FROM_UTF8;
     PERL_UNUSED_CONTEXT;
 
     PERL_ARGS_ASSERT_BYTES_FROM_UTF8;
     PERL_UNUSED_CONTEXT;