X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fhexdump.c;h=343546550dc906b92b44605bfb613f7d740c1467;hb=12137c593d127c6c1a3eb050674da047682badaf;hp=bd5edaeaa80b8c433078e44fda273759c33b80d0;hpb=dc8a7b11aa68d6795a46e0a42ce92220d1a6f0cd;p=linux-2.6-omap-h63xx.git diff --git a/lib/hexdump.c b/lib/hexdump.c index bd5edaeaa80..343546550dc 100644 --- a/lib/hexdump.c +++ b/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'; }