Encode only non-printable chars

This commit is contained in:
pancake 2016-02-23 00:00:55 +01:00
parent 607491e1ce
commit b5b548b1b3

View File

@ -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);