[Pdbg] [PATCH v4 5/5] mem: CR and LF are printable characters
Amitay Isaacs
amitay at ozlabs.org
Wed Apr 10 17:04:43 AEST 2019
Why is isprint() to stupid?
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
src/mem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mem.c b/src/mem.c
index b264d98..2e1f0c5 100644
--- a/src/mem.c
+++ b/src/mem.c
@@ -81,6 +81,9 @@ static int _getmem(uint64_t addr, uint64_t size, uint8_t block_size, bool ci)
bool printable = true;
for (i=0; i<size; i++) {
+ if (buf[i] == 0x0a || buf[i] == 0x0d)
+ continue;
+
if (!isprint(buf[i])) {
printable = false;
break;
--
2.20.1
More information about the Pdbg
mailing list