From 9b6cbf08be36d9119607253993e4ab195bbc3589 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 28 Nov 2007 16:21:46 -0800 Subject: [PATCH] --- yaml --- r: 74368 b: refs/heads/master c: d0eec99ce50baa5cc2ac02363cdb2a771ed4e1e2 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/lib/hexdump.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 01eab69f7e9a..88d8bd8046e7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6454d1f9038f708d7deef6270ed4ba5bb6e55869 +refs/heads/master: d0eec99ce50baa5cc2ac02363cdb2a771ed4e1e2 diff --git a/trunk/lib/hexdump.c b/trunk/lib/hexdump.c index bd5edaeaa80b..343546550dc9 100644 --- a/trunk/lib/hexdump.c +++ b/trunk/lib/hexdump.c @@ -106,7 +106,8 @@ void hex_dump_to_buffer(const void *buf, size_t len, int rowsize, while (lx < (linebuflen - 1) && lx < (ascii_column - 1)) linebuf[lx++] = ' '; for (j = 0; (j < rowsize) && (j < len) && (lx + 2) < linebuflen; j++) - linebuf[lx++] = isprint(ptr[j]) ? ptr[j] : '.'; + linebuf[lx++] = (isascii(ptr[j]) && isprint(ptr[j])) ? ptr[j] + : '.'; nil: linebuf[lx++] = '\0'; }