aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f74bef6b1..b596833e7 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12431,7 +12431,7 @@ parsesub: {
STPUTC(c, out);
c = pgetc_eatbnl();
} while (isdigit(c));
- } else {
+ } else if (c != '}') {
/* $[{[#]]<specialchar>[}] */
int cc = c;
@@ -12457,7 +12457,8 @@ parsesub: {
}
USTPUTC(cc, out);
- }
+ } else
+ goto badsub;
if (c != '}' && subtype == VSLENGTH) {
/* ${#VAR didn't end with } */