diff options
author | Denys Vlasenko | 2023-05-26 13:33:08 +0200 |
---|---|---|
committer | Denys Vlasenko | 2023-05-26 13:33:08 +0200 |
commit | de851bc9b2dcf3f5fad424172d08e850c8af7d62 (patch) | |
tree | d178ffb04bd9c99cb000b1811622caa2dd800ac1 /libbb | |
parent | 25a10ffe1fcec1adc40d91d1f4ddfdf7fe12cc74 (diff) | |
download | busybox-de851bc9b2dcf3f5fad424172d08e850c8af7d62.zip busybox-de851bc9b2dcf3f5fad424172d08e850c8af7d62.tar.gz |
od, hexdump: byte 0x11 is "dc1" not "dcl"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/dump.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libbb/dump.c b/libbb/dump.c index 21c6c70..fc145ed 100644 --- a/libbb/dump.c +++ b/libbb/dump.c @@ -516,10 +516,12 @@ static void conv_u(PR *pr, unsigned char *p) static const char list[] ALIGN1 = "nul\0soh\0stx\0etx\0eot\0enq\0ack\0bel\0" "bs\0_ht\0_lf\0_vt\0_ff\0_cr\0_so\0_si\0_" - "dle\0dcl\0dc2\0dc3\0dc4\0nak\0syn\0etb\0" + "dle\0dc1\0dc2\0dc3\0dc4\0nak\0syn\0etb\0" "can\0em\0_sub\0esc\0fs\0_gs\0_rs\0_us"; + /* NB: bug: od uses %_u to implement -a, + * but it should use "nl", not "lf", for char #10. + */ - /* od used nl, not lf */ if (*p <= 0x1f) { *pr->cchar = 's'; printf(pr->fmt, list + (4 * (int)*p)); |