From b5b548b1b34d32e0a4bda1ba31fcc62a4c9038dc Mon Sep 17 00:00:00 2001 From: pancake Date: Tue, 23 Feb 2016 00:00:55 +0100 Subject: [PATCH] Encode only non-printable chars --- libr/util/str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libr/util/str.c b/libr/util/str.c index 462f4a2c81..bd85ac3412 100644 --- a/libr/util/str.c +++ b/libr/util/str.c @@ -984,7 +984,7 @@ static char *r_str_escape_ (const char *buf, const int dot_nl) { break; default: /* Outside the ASCII printable range */ - if (*p < ' ' && *p > 0x7E) { + if (!IS_PRINTABLE (*p)) { *q++ = '\\'; *q++ = 'x'; *q++ = '0'+((*p)>>4);