about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 384717916..5f9e89882 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2985,10 +2985,10 @@ bslashquote(const char *s, char **e, int instring)
 	if (e && *e == u)
 	    *e = v, sf = 1;
 	if (ispecial(*u) &&
-	    (!instring || (isset(BANGHIST) &&
-			   *u == (char)bangchar) ||
+	    (!instring ||
+	     (isset(BANGHIST) && *u == (char)bangchar) ||
 	     (instring == 2 &&
-	      (*u == '$' || *u == '`' || *u == '\"')) ||
+	      (*u == '$' || *u == '`' || *u == '\"' || *u == '\\')) ||
 	     (instring == 1 && *u == '\''))) {
 	    if (*u == '\n' || (instring == 1 && *u == '\'')) {
 		if (unset(RCQUOTES)) {