try to fix another bug in word wrap
This commit is contained in:
parent
fbd07d5b6c
commit
840f5c41aa
@ -729,6 +729,7 @@ static char *www_wordwrap(char *content, int cutoff) {
|
|||||||
// wrap
|
// wrap
|
||||||
if (last_space != NULL) {
|
if (last_space != NULL) {
|
||||||
*last_space = '\r';
|
*last_space = '\r';
|
||||||
|
line_count = strlen(&last_space);
|
||||||
last_space = NULL;
|
last_space = NULL;
|
||||||
} else {
|
} else {
|
||||||
ret = (char *)realloc(ret, strlen(content) + 2);
|
ret = (char *)realloc(ret, strlen(content) + 2);
|
||||||
@ -738,8 +739,8 @@ static char *www_wordwrap(char *content, int cutoff) {
|
|||||||
ret[at++] = '\r';
|
ret[at++] = '\r';
|
||||||
ret[at] = '\0';
|
ret[at] = '\0';
|
||||||
last_space = NULL;
|
last_space = NULL;
|
||||||
|
line_count = 0;
|
||||||
}
|
}
|
||||||
line_count = 0;
|
|
||||||
} else {
|
} else {
|
||||||
line_count++;
|
line_count++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user