]> granicus.if.org Git - php/commitdiff
- Fix bug #30868 (evaluated pointer comparison in mbregex causes compile
authorMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 21 Feb 2005 10:19:11 +0000 (10:19 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 21 Feb 2005 10:19:11 +0000 (10:19 +0000)
  failure).

ext/mbstring/php_mbregex.c

index b3f812fb48d221fddf22eb9b0405355d7cd9172b..33f1ad1653f1b7c08bba076886a531bd88890d25 100644 (file)
@@ -501,7 +501,7 @@ PHP_FUNCTION(mb_regex_encoding)
                   zend_get_parameters_ex(1, &arg1) != FAILURE) {
                convert_to_string_ex(arg1);
                mbctype = php_mb_regex_name2mbctype(Z_STRVAL_PP(arg1));
-               if (mbctype < 0) {
+               if (mbctype == ONIG_ENCODING_UNDEF) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding \"%s\"", Z_STRVAL_PP(arg1));
                        RETVAL_FALSE;
                } else {