[git commit] shuf: fix pfx_len calculation
Denys Vlasenko
vda.linux at googlemail.com
Wed Apr 12 12:56:05 UTC 2023
commit: https://git.busybox.net/busybox/commit/?id=f7065aa9ae54ce0d1772fd2e6f0e0b6862a50b71
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
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") */
More information about the busybox-cvs
mailing list