fix mistake in wordwrap

This commit is contained in:
Andrew Pamment 2018-02-27 22:38:37 +10:00
parent 2a0ef93fb2
commit 77303fc475

View File

@ -724,7 +724,7 @@ 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') { if (at > 0 && content[at-1] != '\r') {
content[at++] = ' '; content[at++] = ' ';
} }
} }