summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2004-07-12 12:17:56 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2004-07-12 12:17:56 +0000
commitfe9ebb7aa0380e795b3b6d8a511bc57c776aee77 (patch)
treeb282159a1d2937e5d7e927156dbb0b3c44e5b26e /utf8.c
parentf1565dc5a1645da156692de0b26f03bf84455ba6 (diff)
downloadperl-fe9ebb7aa0380e795b3b6d8a511bc57c776aee77.tar.gz
Perl_is_utf8_string(pTHX_ U8 *s, STRLEN len)
Can now handle the case is_utf8_string(NULL,0) again. Why do we have code dup for Perl_is_utf8_string_loc() ? p4raw-id: //depot/perl@23083
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index 6f201a23f1..6155fabe3c 100644
--- a/utf8.c
+++ b/utf8.c
@@ -232,7 +232,7 @@ Perl_is_utf8_string(pTHX_ U8 *s, STRLEN len)
U8* send;
STRLEN c;
- if (!len)
+ if (!len && s)
len = strlen((char *)s);
send = s + len;
@@ -272,7 +272,7 @@ Perl_is_utf8_string_loc(pTHX_ U8 *s, STRLEN len, U8 **p)
U8* send;
STRLEN c;
- if (!len)
+ if (!len && s)
len = strlen((char *)s);
send = s + len;