diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2004-01-31 21:56:42 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2004-01-31 21:56:42 +0000 |
commit | 8e44a6ba0afb24dc8eac0925d5d2886e6e441ed4 (patch) | |
tree | ab3592a281ec42d96dd3f47acf631d5717b6bb9a /ext/pcre/php_pcre.c | |
parent | 46be4c2626327ab3488bd513a07a8ed1667cd98b (diff) | |
download | php-git-8e44a6ba0afb24dc8eac0925d5d2886e6e441ed4.tar.gz |
- POSIX / ISOX compliancy. This is needed to correctly handle UTF-8 characters.
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 3e8ac6cb8f..c7702da11d 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -172,7 +172,7 @@ PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_ /* Parse through the leading whitespace, and display a warning if we get to the end without encountering a delimiter. */ - while (isspace((int)*p)) p++; + while (isspace((int)*(unsigned char *)p)) p++; if (*p == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty regular expression"); return NULL; @@ -181,7 +181,7 @@ PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_ /* Get the delimiter and display a warning if it is alphanumeric or a backslash. */ delimiter = *p++; - if (isalnum((int)delimiter) || delimiter == '\\') { + if (isalnum((int)*(unsigned char *)&delimiter) || delimiter == '\\') { php_error_docref(NULL TSRMLS_CC,E_WARNING, "Delimiter must not be alphanumeric or backslash"); return NULL; } |