From: Antony Dovgal Date: Fri, 28 Jul 2006 12:21:34 +0000 (+0000) Subject: patch for #37846 (wordwrap() wraps incorrectly) X-Git-Tag: RELEASE_1_0_0RC1~2187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6de0063dd9eb495fac38a771bddbe2efc0d8b2d;p=php patch for #37846 (wordwrap() wraps incorrectly) by Dmitry Kononov --- diff --git a/ext/standard/string.c b/ext/standard/string.c index c2851f3b34..aa38b608a9 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -872,7 +872,7 @@ PHP_FUNCTION(wordwrap) lastspace = current; } else if (current - laststart >= linelength && laststart != lastspace) { newtext[lastspace] = breakchar[0]; - laststart = lastspace; + laststart = lastspace + 1; } }