From 18e259480eb3a354aeaf4e3beda598ec02dafadb Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 7 Sep 2005 07:00:03 +0000 Subject: [PATCH] Fixed unicode support for substr_count() --- ext/standard/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index c474d9d27b..fbeed23a45 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -5273,7 +5273,7 @@ PHP_FUNCTION(substr_count) 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 { -- 2.50.1