From 3363d9152a6c879dd334e2ebd6186d61d453e9e1 Mon Sep 17 00:00:00 2001 From: jakcron Date: Fri, 1 Jun 2018 20:22:09 +0800 Subject: [PATCH] [fnd] Fix SimpleTextOutput::hxdStyleOutput() --- lib/libfnd/source/SimpleTextOutput.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libfnd/source/SimpleTextOutput.cpp b/lib/libfnd/source/SimpleTextOutput.cpp index 6482454..e1efc77 100644 --- a/lib/libfnd/source/SimpleTextOutput.cpp +++ b/lib/libfnd/source/SimpleTextOutput.cpp @@ -19,7 +19,7 @@ void fnd::SimpleTextOutput::hxdStyleDump(const byte_t* data, size_t len, size_t printf(" "); for (size_t j = 0; j < row_len; j++) { - printf("%c", isalnum(data[(i * row_len) + j]) ? data[(i * row_len) + j] : '.'); + printf("%c", iscntrl(data[(i * row_len) + j]) ? '.' : data[(i * row_len) + j]); } printf("\n"); } @@ -43,7 +43,7 @@ void fnd::SimpleTextOutput::hxdStyleDump(const byte_t* data, size_t len, size_t for (size_t j = 0; j < row_len; j++) { if (j < (len % row_len)) - printf("%c", isalnum(data[(i * row_len) + j]) ? data[(i * row_len) + j] : '.'); + printf("%c", iscntrl(data[(i * row_len) + j]) ? '.' : data[(i * row_len) + j]); else printf(" "); }