diff options
-rw-r--r-- | src/print.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/print.c b/src/print.c index 443b2f03a30..30e9ff74af1 100644 --- a/src/print.c +++ b/src/print.c @@ -1218,11 +1218,14 @@ print (obj, printcharfun, escapeflag) /* If we just had a hex escape, and this character could be taken as part of it, output `\ ' to prevent that. */ - if (need_nonhex - && ((c >= 'a' && c <= 'f') + if (need_nonhex) + { + need_nonhex = 0; + if ((c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') - || (c >= '0' && c <= '9'))) - strout ("\\ ", -1, -1, printcharfun, 0); + || (c >= '0' && c <= '9')) + strout ("\\ ", -1, -1, printcharfun, 0); + } if (c == '\"' || c == '\\') PRINTCHAR ('\\'); |