This commit is contained in:
Andrew Pamment 2018-02-27 21:38:56 +10:00
parent 50d2bab142
commit 9dd95d9181

View File

@ -712,11 +712,11 @@ static char *www_wordwrap(char *content, int cutoff) {
} }
at = 0; at = 0;
for (i=0;i<len;i++) { for (i=0;i<len;i++) {
if (content[i] == '\r' && content[i+1] != '\r') { if (content[i] == '\r' && content[i+1] != '\r' && content[i+1] != '\0') {
content[at++] = ' '; content[at++] = ' ';
content[at++] = content[i+1]; content[at++] = content[i+1];
i++; i++;
} else if (content[i] == '\r' && content[i+1] == '\r') { } else if (content[i] == '\r' && content[i+1] == '\r' && content[i+1] != '\0') {
content[at++] = '\r'; content[at++] = '\r';
i++; i++;
} else { } else {