From f7065aa9ae54ce0d1772fd2e6f0e0b6862a50b71 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 12 Apr 2023 14:56:05 +0200 Subject: shuf: fix pfx_len calculation Signed-off-by: Denys Vlasenko --- coreutils/shuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreutils/shuf.c b/coreutils/shuf.c index 3483a289b..107899a10 100644 --- a/coreutils/shuf.c +++ b/coreutils/shuf.c @@ -138,7 +138,7 @@ int shuf_main(int argc, char **argv) a--; b--; } - pfx_len = a - opt_i_str; /* can end up being 0 */ + pfx_len = a - pfx; /* can end up being 0 */ padding_width -= pfx_len; } else { /* Undo leading zero 'eating' (think "0-9") */ -- cgit v1.2.3-55-g6feb