perf script: Fix hex dump character output
[sfrench/cifs-2.6.git] / tools / perf / util / debug.c
index 2c06abf6dcd263d741a7fb2b7ba109554b56a691..65e6c22f38e4fcbc8e24d9caead2697e4c78f60d 100644 (file)
@@ -179,7 +179,7 @@ static int trace_event_printer(enum binary_printer_ops op,
                break;
        case BINARY_PRINT_CHAR_DATA:
                printed += color_fprintf(fp, color, "%c",
-                             isprint(ch) ? ch : '.');
+                             isprint(ch) && isascii(ch) ? ch : '.');
                break;
        case BINARY_PRINT_CHAR_PAD:
                printed += color_fprintf(fp, color, " ");