diff options
Diffstat (limited to 'src/wasm-stream.c')
-rw-r--r-- | src/wasm-stream.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/wasm-stream.c b/src/wasm-stream.c index b809fdb3..a64638e0 100644 --- a/src/wasm-stream.c +++ b/src/wasm-stream.c @@ -142,12 +142,14 @@ void wasm_write_memory_dump(WasmStream* stream, wasm_write_char(stream, ' '); } - wasm_write_char(stream, ' '); - p = line; - int i; - for (i = 0; i < DUMP_OCTETS_PER_LINE && p < end; ++i, ++p) - if (print_chars) + if (print_chars == WASM_PRINT_CHARS) { + wasm_write_char(stream, ' '); + p = line; + int i; + for (i = 0; i < DUMP_OCTETS_PER_LINE && p < end; ++i, ++p) wasm_write_char(stream, isprint(*p) ? *p : '.'); + } + /* if there are multiple lines, only print the desc on the last one */ if (p >= end && desc) wasm_writef(stream, " ; %s", desc); |