Upstream commit:
Date: Mon, 27 May 2019 13:39:37 +0800
parser: Only accept single-digit parameter expansion outside of braces
This patch should fix the problem.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
do {
STPUTC(c, out);
c = pgetc_eatbnl();
- } while (isdigit(c));
+ } while (!subtype && isdigit(c));
} else if (c != '}') {
/* $[{[#]]<specialchar>[}] */
int cc = c;
--- /dev/null
+Zero:0
+One:1
+Done:0
--- /dev/null
+set -- : 2 3 4 5 6 7 8 9 ten eleven
+echo Zero$10
+echo One$11
+echo Done:$?
--- /dev/null
+Zero:0
+One:1
+Done:0
--- /dev/null
+set -- : 2 3 4 5 6 7 8 9 ten eleven
+echo Zero$10
+echo One$11
+echo Done:$?