From: Antony Dovgal Date: Wed, 20 Aug 2008 13:46:29 +0000 (+0000) Subject: initialize variable and fix WS X-Git-Tag: BEFORE_HEAD_NS_CHANGE~642 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2b4b308b12337e735a1c4b53f04097fc5e97292;p=php initialize variable and fix WS --- diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 694a3a145c..c6fc51d6cc 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -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)) {