more fiddling with wordwrap

This commit is contained in:
Andrew Pamment 2018-02-27 22:36:24 +10:00
parent 962e4cc67f
commit 2a0ef93fb2

View File

@ -724,8 +724,10 @@ static char *www_wordwrap(char *content, int cutoff) {
if (content[i+1] == ' ') { if (content[i+1] == ' ') {
content[at++] = '\r'; content[at++] = '\r';
} else { } else {
if (content[at-1] != '\r') {
content[at++] = ' '; content[at++] = ' ';
} }
}
} else if (content[i] == '\r' && content[i+1] == '\r') { } else if (content[i] == '\r' && content[i+1] == '\r') {
content[at++] = '\r'; content[at++] = '\r';
content[at++] = '\r'; content[at++] = '\r';