From c5c5faf772d2b69ce111e63608b31026c827a19e Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 28 Feb 2018 09:17:02 +1000 Subject: [PATCH] fiddling with wordwrap --- 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 f35a901..e03ca62 100644 --- a/src/www_msgs.c +++ b/src/www_msgs.c @@ -784,7 +784,7 @@ static char *www_wordwrap(char *content, int cutoff) { } else if (line_count == cutoff) { // wrap if (quote_line == 1) { - while (content[i] != '\r') { + while (i < len - 1 && content[i + 1] != '\r') { i++; } last_space = NULL;