From: Frank M. Kromann Date: Fri, 1 Dec 2000 01:26:42 +0000 (+0000) Subject: Fixing bug 8061. Position counter starts a 0 but was compared with length. X-Git-Tag: php-4.0.4RC3~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=518ab3c62f2f85440a332f55009cae9208078cc3;p=php Fixing bug 8061. Position counter starts a 0 but was compared with length. --- diff --git a/ext/standard/string.c b/ext/standard/string.c index e4e653bd1d..65a5a843ba 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -287,7 +287,7 @@ PHP_FUNCTION(wordwrap) } l++; } - if (l > linelength) { + if (l >= linelength) { pgr = l; l = linelength; /* needs breaking; work backwards to find previous word */