From ce888d9ad1e5604258c0b1fef736fe136c1e3328 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 25 May 2018 22:44:44 +1000 Subject: [PATCH] maybe this time? --- src/www_msgs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/www_msgs.c b/src/www_msgs.c index 3761b5e..904ed6e 100644 --- a/src/www_msgs.c +++ b/src/www_msgs.c @@ -788,7 +788,7 @@ static char *www_wordwrap(char *content, int cutoff) { quote_line = 0; } else if (quote_line != 1) { for (z = i+1;content[z] != ' ' && z < len;z++); - if (at > 0 && content[at-1] != '\r' && content[at-1] != ' ' && cutoff - line_count < z) { + if (at > 0 && content[at-1] != '\r' && content[at-1] != ' ' && cutoff - line_count < z - i) { content[at++] = ' '; line_count++; } else {