Fixing bug 8061. Position counter starts a 0 but was compared with length.

This commit is contained in:
Frank M. Kromann 2000-12-01 01:26:42 +00:00
parent 744f1a34ef
commit 518ab3c62f

View 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 */