cvs: php4 /ext/standard string.c

From: Date: Thu, 18 Jan 2001 21:46:24 +0000
Subject: cvs: php4 /ext/standard string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3689@lists.php.net to get a copy of this message
derick Thu Jan 18 13:46:24 2001 EDT Modified files: /php4/ext/standard string.c Log: - Fix for bug #8367 (wordwrap not cutting correctly) Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.184 php4/ext/standard/string.c:1.185 --- php4/ext/standard/string.c:1.184 Tue Jan 16 17:10:50 2001 +++ php4/ext/standard/string.c Thu Jan 18 13:46:24 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.184 2001/01/17 01:10:50 elixer Exp $ */ +/* $Id: string.c,v 1.185 2001/01/18 21:46:24 derick Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -442,7 +442,7 @@ } if (l == -1) { /* couldn't break it backwards, try looking forwards */ - l = linelength; + l = linelength - 1; while (l <= pgr) { if (docut == 0) { @@ -456,13 +456,12 @@ if (docut == 1) { if (text[i+l] == ' ' || l > i-last) { - strncat(newtext, text+last, i+l-last); + strncat(newtext, text+last, i+l-last+1); strcat(newtext, breakchar); - last = i + l; + last = i + l + 1; break; } } - l ++; } } i += l+1;

« previous php.cvs (#3689) next »