summaryrefslogtreecommitdiffstats
path: root/bin/sh/parser.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-22 07:24:31 -0300
committerRenato Botelho <renato@netgate.com>2015-09-22 07:24:31 -0300
commitb5a91a37da44408c68a25426a16a8ca84686f054 (patch)
tree5761589f6059a9c8a3df1d4aed7e7972e6b1c431 /bin/sh/parser.c
parent8400c0790e456038fbca4995d032d4e3d44c3d31 (diff)
parent0f328f755ef12f6cb68a753ed5e48e934002a2b8 (diff)
downloadFreeBSD-src-b5a91a37da44408c68a25426a16a8ca84686f054.zip
FreeBSD-src-b5a91a37da44408c68a25426a16a8ca84686f054.tar.gz
Merge branch 'stable/10' into devel
Diffstat (limited to 'bin/sh/parser.c')
-rw-r--r--bin/sh/parser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c
index e6e9f82..b577a8a 100644
--- a/bin/sh/parser.c
+++ b/bin/sh/parser.c
@@ -1671,7 +1671,7 @@ varname:
pungetc();
else if (c == '\n' || c == PEOF)
synerror("Unexpected end of line in substitution");
- else
+ else if (BASESYNTAX[c] != CCTL)
USTPUTC(c, out);
}
if (subtype == 0) {
@@ -1687,7 +1687,8 @@ varname:
synerror("Unexpected end of line in substitution");
if (flags == VSNUL)
STPUTC(':', out);
- STPUTC(c, out);
+ if (BASESYNTAX[c] != CCTL)
+ STPUTC(c, out);
subtype = VSERROR;
} else
subtype = p - types + VSNORMAL;
OpenPOWER on IntegriCloud