dmitry                                   Tue, 15 Dec 2009 12:29:26 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292159

Log:
Fixed ASCII-comatimle encoding detection

Changed paths:
    U   php/php-src/trunk/Zend/zend_language_scanner.l

Modified: php/php-src/trunk/Zend/zend_language_scanner.l
===================================================================
--- php/php-src/trunk/Zend/zend_language_scanner.l      2009-12-15 12:14:28 UTC 
(rev 292158)
+++ php/php-src/trunk/Zend/zend_language_scanner.l      2009-12-15 12:29:26 UTC 
(rev 292159)
@@ -492,13 +492,13 @@
                                char output[sizeof(expected)];

                                if (ucnv_fromUChars(conv,
-                                                   output, sizeof(output),
-                                                   ascii, sizeof(expected),
-                                                   &status) != 
sizeof(expected) ||
+                                                   output, sizeof(output)-1,
+                                                   ascii, sizeof(expected)-1,
+                                                   &status) != 
sizeof(expected)-1 ||
                                    U_FAILURE(status)) {
                                        ret = 0;
                                } else {
-                                       ret = (memcmp(expected, output, 
sizeof(expected)) == 0);
+                                       ret = (memcmp(expected, output, 
sizeof(expected)-1) == 0);
                                }
                        }
                }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to