]> granicus.if.org Git - php/commitdiff
patch for #37846 (wordwrap() wraps incorrectly)
authorAntony Dovgal <tony2001@php.net>
Fri, 28 Jul 2006 12:21:34 +0000 (12:21 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 28 Jul 2006 12:21:34 +0000 (12:21 +0000)
by Dmitry Kononov <ddk at krasn dot ru>

ext/standard/string.c

index c2851f3b34f4c8a7f1cec4c09c138d9340ac900e..aa38b608a91de2dc518c991b8e6dca2aba28e8f8 100644 (file)
@@ -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;
                        }
                }