Message ID | 20190527053937.s3dmtzec4zo6gpcg@gondor.apana.org.au (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | parser: Only accept single-digit parameter expansion outside of braces | expand |
On 5/27/19 1:39 AM, Herbert Xu wrote: > On Thu, Apr 25, 2019 at 01:39:52AM +0000, Michael Orlitzky wrote: >> >> However, dash seems to diverge from that behavior when we get to $10: >> >> ... > > This patch should fix the problem. > Seems to work, thanks!
diff --git a/src/parser.c b/src/parser.c index 1f9e8ec..2f14bf3 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1268,7 +1268,7 @@ varname: do { STPUTC(c, out); c = pgetc_eatbnl(); - } while (is_digit(c)); + } while (!subtype && is_digit(c)); } else if (c != '}') { int cc = c;