diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-05-31 16:39:22 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-05-31 16:40:14 +0100 |
commit | 75cafccc0a11493ce669a6372d57ef89a801b189 (patch) | |
tree | 77e67b3a4615a1be3b465a1900bd56aa6c133fb0 /Src | |
parent | 911edc5ea475bdf679feee7c800369d8285c263d (diff) | |
download | zsh-75cafccc0a11493ce669a6372d57ef89a801b189.tar.gz zsh-75cafccc0a11493ce669a6372d57ef89a801b189.tar.xz zsh-75cafccc0a11493ce669a6372d57ef89a801b189.zip |
35343: Avoid $#name length handling for POSIX_IDENTIFIERS
Diffstat (limited to 'Src')
-rw-r--r-- | Src/subst.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/subst.c b/Src/subst.c index 168f7f156..81d34d28a 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -2156,6 +2156,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) nojoin = !(ifs && *ifs); } } else if ((c == '#' || c == Pound) && + (inbrace || !isset(POSIXIDENTIFIERS)) && (itype_end(s+1, IIDENT, 0) != s + 1 || (cc = s[1]) == '*' || cc == Star || cc == '@' || cc == '?' || cc == Quest @@ -2170,7 +2171,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) */ || ((cc == '#' || cc == Pound) && s[2] == Outbrace) - || (inbrace && (cc == '-' || (cc == ':' && s[2] == '-'))) + || cc == '-' || (cc == ':' && s[2] == '-') || (isstring(cc) && (s[2] == Inbrace || s[2] == Inpar)))) { getlen = 1 + whichlen, s++; /* |