stop crashing!
This commit is contained in:
parent
9dd95d9181
commit
29bdc52efa
@ -711,19 +711,19 @@ static char *www_wordwrap(char *content, int cutoff) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
at = 0;
|
at = 0;
|
||||||
for (i=0;i<len;i++) {
|
for (i=0;i<len-1;i++) {
|
||||||
if (content[i] == '\r' && content[i+1] != '\r' && content[i+1] != '\0') {
|
if (content[i] == '\r' && content[i+1] != '\r') {
|
||||||
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' && content[i+1] != '\0') {
|
} else if (content[i] == '\r' && content[i+1] == '\r') {
|
||||||
content[at++] = '\r';
|
content[at++] = '\r';
|
||||||
i++;
|
i++;
|
||||||
} else {
|
} else {
|
||||||
content[at++] = content[i];
|
content[at++] = content[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//content[at++] = content[i];
|
||||||
content[at] = '\0';
|
content[at] = '\0';
|
||||||
at = 0;
|
at = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user