From f6de0063dd9eb495fac38a771bddbe2efc0d8b2d Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Fri, 28 Jul 2006 12:21:34 +0000 Subject: [PATCH] patch for #37846 (wordwrap() wraps incorrectly) by Dmitry Kononov --- 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 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; } } -- 2.50.1