aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2023-04-12 14:56:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2023-04-12 14:56:05 +0200
commitf7065aa9ae54ce0d1772fd2e6f0e0b6862a50b71 (patch)
treeb13faccd941622e2c8ee561d18f00806ae53888d
parent8696f5d380209e6aba13ffc52eced9239510b275 (diff)
downloadbusybox-w32-f7065aa9ae54ce0d1772fd2e6f0e0b6862a50b71.tar.gz
busybox-w32-f7065aa9ae54ce0d1772fd2e6f0e0b6862a50b71.tar.bz2
busybox-w32-f7065aa9ae54ce0d1772fd2e6f0e0b6862a50b71.zip
shuf: fix pfx_len calculation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/shuf.c2
1 files changed, 1 insertions, 1 deletions
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)
138 a--; 138 a--;
139 b--; 139 b--;
140 } 140 }
141 pfx_len = a - opt_i_str; /* can end up being 0 */ 141 pfx_len = a - pfx; /* can end up being 0 */
142 padding_width -= pfx_len; 142 padding_width -= pfx_len;
143 } else { 143 } else {
144 /* Undo leading zero 'eating' (think "0-9") */ 144 /* Undo leading zero 'eating' (think "0-9") */