diff options
| author | Moriyoshi Koizumi <moriyoshi@php.net> | 2002-10-25 09:36:36 +0000 |
|---|---|---|
| committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2002-10-25 09:36:36 +0000 |
| commit | 36447ebe050ac0891d90d3ebff099b8c960094ac (patch) | |
| tree | 4611958ed8ee7a58d9b208a69b7e8eae5dccacb6 | |
| parent | e431d6a1c977d9f24b1ffe44ac450c342ca4fd99 (diff) | |
| download | php-git-36447ebe050ac0891d90d3ebff099b8c960094ac.tar.gz | |
Fixed null value check in php_mb_mbchar_bytes_ex() as it should be
| -rw-r--r-- | ext/mbstring/mbstring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 4d2bf3b2ec..d48c937a93 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3451,7 +3451,7 @@ PHPAPI size_t php_mb_mbchar_bytes_ex(const char *s, const mbfl_encoding *enc) if (enc != NULL) { if(enc->flag & MBFL_ENCTYPE_MBCS) { if(enc->mblen_table != NULL) { - if (*s != '\0') return enc->mblen_table[*(unsigned char *)s]; + if (s != NULL) return enc->mblen_table[*(unsigned char *)s]; } } else if (enc->flag & (MBFL_ENCTYPE_WCS2BE | MBFL_ENCTYPE_WCS2LE)) { return 2; |
