From 0ebdbe71b4aeb1acc982f95c9fd265fae2cbad16 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 25 May 2018 22:38:11 +1000 Subject: [PATCH] Messing 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 4fb20af..da8dc75 100644 --- a/src/www_msgs.c +++ b/src/www_msgs.c @@ -763,6 +763,7 @@ static char *www_wordwrap(char *content, int cutoff) { int at = 0; int extra = 0; int quote_line = 0; + int z; for (i=0;i 0 && content[at-1] != '\r' && content[at-1] != ' ') { + for (z = i+1;content[z] != ' ' && z < len;z++); + if (at > 0 && content[at-1] != '\r' && content[at-1] != ' ' && cutoff - line_count < z) { content[at++] = ' '; line_count++; }