diff options
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -163,9 +163,13 @@ bool Perl_is_utf8_string(pTHX_ U8 *s, STRLEN len) { U8* x = s; - U8* send = s + len; + U8* send; STRLEN c; + if (!len) + len = strlen(s); + send = s + len; + while (x < send) { c = is_utf8_char(x); if (!c) |