going to get it right eventually...

This commit is contained in:
Andrew Pamment 2018-02-27 22:44:31 +10:00
parent 6d5ef94796
commit 735fe035d7

View File

@ -724,7 +724,7 @@ static char *www_wordwrap(char *content, int cutoff) {
if (content[i+1] == ' ') {
content[at++] = '\r';
} else {
if (at > 0 && content[at-1] != '\r') {
if (at > 0 && content[at-1] != '\r' && content[at-1] != ' ') {
content[at++] = ' ';
}
}
@ -733,9 +733,6 @@ static char *www_wordwrap(char *content, int cutoff) {
content[at++] = '\r';
i++;
} else {
if (content[i] == ' ' && at > 0 && content[at-1] == '\r') {
continue;
}
content[at++] = content[i];
}
}