summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/expand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index 1693a0b..354d5e9 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -499,8 +499,6 @@ expbackq(union node *cmd, int quoted, int flag)
}
lastc = *p++;
if (lastc != '\0') {
- if (quotes && syntax[(int)lastc] == CCTL)
- STPUTC(CTLESC, dest);
if (lastc == '\n') {
nnl++;
} else {
@@ -508,6 +506,8 @@ expbackq(union node *cmd, int quoted, int flag)
nnl--;
STPUTC('\n', dest);
}
+ if (quotes && syntax[(int)lastc] == CCTL)
+ STPUTC(CTLESC, dest);
STPUTC(lastc, dest);
}
}
OpenPOWER on IntegriCloud