print_binary(): everything except printable characters (including space)
are displayed in hex Thanks to Ian Young for the patch http://www.opensc-project.org/pipermail/opensc-devel/2008-January/010641.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3313 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
156f368f9d
commit
e9135ff347
|
@ -99,7 +99,7 @@ void print_binary(FILE *f, const u8 *buf, int count)
|
|||
for (i = 0; i < count; i++) {
|
||||
unsigned char c = buf[i];
|
||||
const char *format;
|
||||
if (!isalnum(c) && !ispunct(c) && !isspace(c))
|
||||
if (!isprint(c))
|
||||
format = "\\x%02X";
|
||||
else
|
||||
format = "%c";
|
||||
|
|
Loading…
Reference in New Issue