cvs: php-src /ext/standard string.c
| From: | Dmitry Stogov | Date: | Wed, 07 Sep 2005 07:00:04 +0000 |
| Subject: | cvs: php-src /ext/standard string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-33832@lists.php.net to get a copy of this message | ||
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 {