This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix UTF8_CHK_SKIP()
authorKarl Williamson <khw@cpan.org>
Sun, 13 Oct 2019 07:35:43 +0000 (00:35 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 13 Oct 2019 19:05:52 +0000 (12:05 -0700)
I forgot an arg in a macro it calls.

utf8.h

diff --git a/utf8.h b/utf8.h
index 83cccf1..8868efb 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -583,7 +583,8 @@ L</C<UTF8_SAFE_SKIP>>, for example when interfacing with a C library.
 */
 
 #define UTF8_CHK_SKIP(s)                                                       \
-            (s[0] == '\0' ? 1 : MIN(my_strnlen((char *) (s), UTF8SKIP(s))))
+            (s[0] == '\0' ? 1 : MIN(UTF8SKIP(s),                               \
+                                    my_strnlen((char *) (s), UTF8SKIP(s))))
 /*
 
 =for apidoc Am|STRLEN|UTF8_SAFE_SKIP|char* s|char* e