]> granicus.if.org Git - php/commitdiff
MFH(r-1.153): POSIX / ISO compliancy.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 1 Feb 2004 19:56:16 +0000 (19:56 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sun, 1 Feb 2004 19:56:16 +0000 (19:56 +0000)
# this commit is granted by Ilia.

ext/pcre/php_pcre.c

index 402eef476b764a2a287a9a356d488cbfe73b565d..68ea54b8e9975113aadbe3f8e9501ccc2be94c8d 100644 (file)
@@ -173,7 +173,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) {
                zend_error(E_WARNING, "Empty regular expression");
                return NULL;
@@ -182,7 +182,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 == '\\') {
                zend_error(E_WARNING, "Delimiter must not be alphanumeric or backslash");
                return NULL;
        }