From: Moriyoshi Koizumi Date: Fri, 1 Aug 2008 22:55:47 +0000 (+0000) Subject: - Fixed bug #43993 (mb_substr_count() behaves differently to substr_count() with... X-Git-Tag: BEFORE_HEAD_NS_CHANGE~913 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9bcdf1d802d4fe347f548855e0bdfe280a38c5f4;p=php - Fixed bug #43993 (mb_substr_count() behaves differently to substr_count() with overlapping needles) --- diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 97d2f048cc..50a0853665 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -1013,6 +1013,7 @@ mbfl_substr_count( if (pc.matched_pos >= 0) { ++result; pc.matched_pos = -1; + pc.needle_pos = 0; } n--; }