1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-26 22:10:45 +02:00

unposted: add test for valid identifier to 30431

This commit is contained in:
Peter Stephenson 2012-04-22 20:49:39 +00:00
parent cb4ff5e970
commit e49e41725a
2 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,7 @@
2012-04-22 Peter Stephenson <p.w.stephenson@ntlworld.com>
* unposted: Src/subst.c: add test for valid identifier to 30431.
* Test/D04parameter.ztst: 30439: Src/subst.c,
Test/D04parameter.ztst: ${...:*...} with nonexistent or
non-array variable second should return no results.
@ -16235,5 +16237,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.5638 $
* $Revision: 1.5639 $
*****************************************************

View File

@ -2879,7 +2879,14 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags)
} else if (inbrace && (*s == '|' || *s == Bar ||
*s == '*' || *s == Star)) {
int intersect = (*s == '*' || *s == Star);
char **compare = getaparam(++s), **ap, **apsrc;
char **compare, **ap, **apsrc;
++s;
if (*itype_end(s, IIDENT, 0)) {
untokenize(s);
zerr("not an identifier: %s", s);
return NULL;
}
compare = getaparam(s);
if (compare) {
HashTable ht = newuniqtable(arrlen(compare)+1);
int present;