aboutsummaryrefslogtreecommitdiff
path: root/libbb/dump.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2023-05-26 13:33:08 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2023-05-26 13:33:08 +0200
commitde851bc9b2dcf3f5fad424172d08e850c8af7d62 (patch)
treed178ffb04bd9c99cb000b1811622caa2dd800ac1 /libbb/dump.c
parent25a10ffe1fcec1adc40d91d1f4ddfdf7fe12cc74 (diff)
downloadbusybox-w32-de851bc9b2dcf3f5fad424172d08e850c8af7d62.tar.gz
busybox-w32-de851bc9b2dcf3f5fad424172d08e850c8af7d62.tar.bz2
busybox-w32-de851bc9b2dcf3f5fad424172d08e850c8af7d62.zip
od, hexdump: byte 0x11 is "dc1" not "dcl"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/dump.c')
-rw-r--r--libbb/dump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbb/dump.c b/libbb/dump.c
index 21c6c7083..fc145edf9 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -516,10 +516,12 @@ static void conv_u(PR *pr, unsigned char *p)
516 static const char list[] ALIGN1 = 516 static const char list[] ALIGN1 =
517 "nul\0soh\0stx\0etx\0eot\0enq\0ack\0bel\0" 517 "nul\0soh\0stx\0etx\0eot\0enq\0ack\0bel\0"
518 "bs\0_ht\0_lf\0_vt\0_ff\0_cr\0_so\0_si\0_" 518 "bs\0_ht\0_lf\0_vt\0_ff\0_cr\0_so\0_si\0_"
519 "dle\0dcl\0dc2\0dc3\0dc4\0nak\0syn\0etb\0" 519 "dle\0dc1\0dc2\0dc3\0dc4\0nak\0syn\0etb\0"
520 "can\0em\0_sub\0esc\0fs\0_gs\0_rs\0_us"; 520 "can\0em\0_sub\0esc\0fs\0_gs\0_rs\0_us";
521 /* NB: bug: od uses %_u to implement -a,
522 * but it should use "nl", not "lf", for char #10.
523 */
521 524
522 /* od used nl, not lf */
523 if (*p <= 0x1f) { 525 if (*p <= 0x1f) {
524 *pr->cchar = 's'; 526 *pr->cchar = 's';
525 printf(pr->fmt, list + (4 * (int)*p)); 527 printf(pr->fmt, list + (4 * (int)*p));