From: Jon Povey Date: Fri, 20 Aug 2010 08:11:19 +0000 (+0900) Subject: nanddump: Fix hexdump nybble ordering X-Git-Tag: v1.4.0~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5beab92915cb3cdd9e479c2af05cfd9c36bf79de;p=mtd-utils.git nanddump: Fix hexdump nybble ordering Hex dumps were being printed with the nybbles reversed since commit 6ff458433ba15b8a7cb258ce64e64e98982df26e Fix. Signed-off-by: Jon Povey CC: Brian Norris Signed-off-by: Artem Bityutskiy --- diff --git a/nanddump.c b/nanddump.c index acfdb33..22fec5f 100644 --- a/nanddump.c +++ b/nanddump.c @@ -239,8 +239,8 @@ static void pretty_dump_to_buffer(const unsigned char *buf, size_t len, for (j = 0; (j < len) && (lx + 3) <= linebuflen; j++) { ch = buf[j]; - linebuf[lx++] = hex_asc[ch & 0x0f]; linebuf[lx++] = hex_asc[(ch & 0xf0) >> 4]; + linebuf[lx++] = hex_asc[ch & 0x0f]; linebuf[lx++] = ' '; } if (j)