From 2a0ef93fb23a1e2b219407625ff533128190694a Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Tue, 27 Feb 2018 22:36:24 +1000 Subject: [PATCH] more fiddling with wordwrap --- src/www_msgs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/www_msgs.c b/src/www_msgs.c index cfe9671..1da264e 100644 --- a/src/www_msgs.c +++ b/src/www_msgs.c @@ -724,7 +724,9 @@ static char *www_wordwrap(char *content, int cutoff) { if (content[i+1] == ' ') { content[at++] = '\r'; } else { - content[at++] = ' '; + if (content[at-1] != '\r') { + content[at++] = ' '; + } } } else if (content[i] == '\r' && content[i+1] == '\r') { content[at++] = '\r';