From 1b62edd6ba4e95bdd43a0089005728c829ff0036 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Sun, 12 Apr 1998 06:49:26 +0000 Subject: [PATCH] (print) : Fix "\ " handling. --- src/print.c | 11 +++++++---- 1 file 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 ('\\'); -- 2.39.2