]> granicus.if.org Git - php/commitdiff
Fixing bug 8061. Position counter starts a 0 but was compared with length.
authorFrank M. Kromann <fmk@php.net>
Fri, 1 Dec 2000 01:26:42 +0000 (01:26 +0000)
committerFrank M. Kromann <fmk@php.net>
Fri, 1 Dec 2000 01:26:42 +0000 (01:26 +0000)
ext/standard/string.c

index e4e653bd1d0929e825147ee976280a8a0a01d0fc..65a5a843ba6e47fabb7b08cf333de84707d69ad4 100644 (file)
@@ -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 */