From ef9cc131748ac7b642e126449e7a815e0d803cda Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 27 Oct 2024 14:23:35 +0000 Subject: [PATCH] term: fix final word in string not being constrained by paragraph margins --- term/paragraph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/term/paragraph.c b/term/paragraph.c index c1a7de2..e7961a8 100644 --- a/term/paragraph.c +++ b/term/paragraph.c @@ -60,7 +60,7 @@ static unsigned int extract_line( } } - if (start[i] == '\0') { + if (start[i] == '\0' && (i - delta) < line_length) { end = NULL; }