]> granicus.if.org Git - php/commitdiff
initialize variable and fix WS
authorAntony Dovgal <tony2001@php.net>
Wed, 20 Aug 2008 13:46:29 +0000 (13:46 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 20 Aug 2008 13:46:29 +0000 (13:46 +0000)
Zend/zend_language_scanner.l

index 694a3a145cf2562940f3202b31d612369f354f0b..c6fc51d6cc3f59e632f183ed78fb722e747bf032 100644 (file)
@@ -592,7 +592,7 @@ ZEND_API int zend_convert_scanner_output(UConverter *conv, UChar **target, int *
 
 int zend_unicode_yyinput(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC)
 {
-       size_t n;
+       size_t n = len;
        const char *src = buf;
 
 #ifdef scottmac_0
@@ -614,10 +614,11 @@ int zend_unicode_yyinput(zend_file_handle *file_handle, char *buf, size_t len TS
                n = zend_stream_read(file_handle, buf, len TSRMLS_CC);
        }
 #endif
+       
        /* Don't make any conversions if unicode=off */
-  if (!UG(unicode)) {
-       return n;
-  }
+       if (!UG(unicode)) {
+               return n;
+       }
 
        /* Autodetect encoding */
        if (!SCNG(encoding_checked)) {