]> sigrok.org Git - pulseview.git/commitdiff
QHexView: Fix saved ASCII output
authorSoeren Apel <redacted>
Fri, 20 Dec 2019 23:10:08 +0000 (00:10 +0100)
committerSoeren Apel <redacted>
Fri, 20 Dec 2019 23:10:08 +0000 (00:10 +0100)
pv/views/decoder_output/QHexView.cpp

index 5c34d61bac5ad9c5022e0db133b2cdcb0eadd8f1..2fe54bf876075710327ef8a428bf4654f9d06606 100644 (file)
@@ -177,6 +177,9 @@ size_t QHexView::create_hex_line(size_t start, size_t end, QString* dest,
                for (size_t i = offset; i < end; i++) {
                        uint8_t value = get_next_byte();
 
+                       if ((value < 0x20) || (value > 0x7E))
+                               value = '.';
+
                        if (i < start)
                                dest->append(' ');
                        else