diff options
Diffstat (limited to 'usr.bin/hexdump')
-rw-r--r-- | usr.bin/hexdump/odsyntax.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/hexdump/odsyntax.c b/usr.bin/hexdump/odsyntax.c index 082a0a0..c371f1e 100644 --- a/usr.bin/hexdump/odsyntax.c +++ b/usr.bin/hexdump/odsyntax.c @@ -423,9 +423,9 @@ odformatint(char fchar, const char *fmt) } if (fchar == 'd') digits++; - asprintf(&hdfmt, "%lu/%lu \"%%%s%d%c \" \"\\n\"", - 16UL / (u_long)isize, (u_long)isize, - (fchar == 'd' || fchar == 'u') ? "" : "0", digits, fchar); + asprintf(&hdfmt, "%lu/%lu \"%*s%%%s%d%c\" \"\\n\"", + 16UL / (u_long)isize, (u_long)isize, (int)(4 * isize - digits), + "", (fchar == 'd' || fchar == 'u') ? "" : "0", digits, fchar); if (hdfmt == NULL) err(1, NULL); odadd(hdfmt); |