printf icon indicating copy to clipboard operation
printf copied to clipboard

printf("%#.5o", 06143), printf("%#.0o", 0)

Open ledvinap opened this issue 5 years ago • 1 comments

In this case (and wider precision) octal zero should be included in padding instead of adding it

printf("%#.5o", 06143)
expected: 06143
got: 006143

printf("%#.6o", 06143)
expected: 006143
got: 0006143

another partially-related case is

sprintf("%#.0o", 0)
glibc: "0"
got: ""

ledvinap avatar Apr 23 '19 20:04 ledvinap

Should be fixed on my fork with 6a3ad44f895137c6fba7198fcb6b8acef80f2b51; see also #109.

eyalroz avatar Aug 03 '21 21:08 eyalroz