← Commit list

f7065aa9a

Denys Vlasenko
Denys Vlasenko
2023-04-12
SUCCESS Duration: 157s

Subject

shuf: fix pfx_len calculation

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/shuf.c+1 -1
@@ -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") */