From: Andrei Zmievski Date: Mon, 27 Mar 2006 19:15:58 +0000 (+0000) Subject: Add UTODO. X-Git-Tag: RELEASE_1_3~223 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=978c58ad78239a3ac467b4608bb4c5a78ecca043;p=php Add UTODO. --- diff --git a/Zend/zend_unicode.c b/Zend/zend_unicode.c index 4d56075c2a..6ed5013e95 100644 --- a/Zend/zend_unicode.c +++ b/Zend/zend_unicode.c @@ -528,7 +528,7 @@ ZEND_API int zend_cmp_unicode_and_string(UChar *ustr, char* str, uint len) /* {{{ zend_cmp_unicode_and_literal */ /* * Compare a Unicode string and an ASCII literal. Because ASCII maps nicely onto Unicode - * range U+0000 .. U+007F, we can simply casst ASCII chars to Unicode values and avoid + * range U+0000 .. U+007F, we can simply cast ASCII chars to Unicode values and avoid * memory allocation. */ ZEND_API int zend_cmp_unicode_and_literal(UChar *ustr, int ulen, char *str, int slen) @@ -536,6 +536,7 @@ ZEND_API int zend_cmp_unicode_and_literal(UChar *ustr, int ulen, char *str, int int result; uint len = MIN(ulen, slen); + /* UTODO: make sure we're only comparing against ASCII values here (< 0x80) */ while (len--) { result = (int)(uint16_t)*ustr - (int)(uint16_t)*str; if (result != 0)