On 31/12/2022 15:12, наб wrote:
Package: coreutils
Version: 8.30-3
Severity: normal
Dear Maintainer,
On all three versions, at my usual teletype size, I get:
$ COLUMNS=172 stty -a | wc -L
173
good catch!
This off by one bug was introduced in v5.3 (2005)
I'll apply the following upstream:
index b4c2cbecd..f3c7915e1 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -519,7 +519,7 @@ wrapf (char const *message,...)
if (0 < current_col)
{
- if (max_col - current_col < buflen)
+ if (max_col - current_col <= buflen)
{
putchar ('\n');
current_col = 0;
thanks,
Pádraig