]> granicus.if.org Git - php/commitdiff
Oh man, gcc's logic is really flawed
authorSascha Schumann <sas@php.net>
Mon, 27 Nov 2000 13:28:26 +0000 (13:28 +0000)
committerSascha Schumann <sas@php.net>
Mon, 27 Nov 2000 13:28:26 +0000 (13:28 +0000)
ext/pcre/php_pcre.c

index e3664f426a1103cf73d76f768c54b549ec08e303..9c39bf8324e064d11a7df3451c5e76b70350d46d 100644 (file)
@@ -1174,7 +1174,7 @@ PHP_FUNCTION(preg_quote)
                        *out_str,               /* Output string with quoted characters */
                        *p,                             /* Iterator for input string */
                        *q,                             /* Iterator for output string */
-                        delim_char,    /* Delimiter character to be quoted */
+                        delim_char=0,  /* Delimiter character to be quoted */
                         c;                             /* Current character */
        zend_bool quote_delim = 0; /* Whether to quote additional delim char */
        
@@ -1199,8 +1199,6 @@ PHP_FUNCTION(preg_quote)
                if (Z_STRLEN_PP(delim) > 0) {
                        delim_char = Z_STRVAL_PP(delim)[0];
                        quote_delim = 1;
-               } else {
-                       delim_char = 0;
                }
        }