dmitry Wed Sep 7 03:00:04 2005 EDT
Modified files:
/php-src/ext/standard string.c
Log:
Fixed unicode support for substr_count()
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.477&r2=1.478&ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.477 php-src/ext/standard/string.c:1.478
--- php-src/ext/standard/string.c:1.477 Mon Sep 5 12:37:45 2005
+++ php-src/ext/standard/string.c Wed Sep 7 03:00:03 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.477 2005/09/05 16:37:45 rolland Exp $ */
+/* $Id: string.c,v 1.478 2005/09/07 07:00:03 dmitry Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -5273,7 +5273,7 @@
if (haystack_type == IS_UNICODE) {
while ((p = zend_u_memnstr((UChar *)p, (UChar *)needle,
needle_len, (UChar *)endp)) != NULL) {
/*(UChar *)p += needle_len; // GCC 4.0.0 cannot compile
this */
- p = (UChar *)p + UBYTES(needle_len);
+ p = (UChar *)p + needle_len;
count++;
}
} else {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php