summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2015-06-02 15:33:07 +0200
committerMikael Magnusson <mikachu@gmail.com>2015-06-02 16:09:35 +0200
commit4dc4e23376888697234e00e0c34184bb308886e1 (patch)
treefb76f3b2992e2342b9b05148df7c1056d59743c8 /Src/exec.c
parent6b4d6eaa9b040a05ad9796d20cda0b797209a443 (diff)
downloadzsh-4dc4e23376888697234e00e0c34184bb308886e1.tar.gz
zsh-4dc4e23376888697234e00e0c34184bb308886e1.zip
GLOB_ASSIGN should only affect scalar assignments
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 9f163a627..daed3b111 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2264,14 +2264,14 @@ addvars(Estate state, Wordcode pc, int addflags)
state->pc = opc;
return;
}
- if (!isstr || (isset(GLOBASSIGN) &&
+ if (!isstr || (isset(GLOBASSIGN) && isstr &&
haswilds((char *)getdata(firstnode(vl))))) {
globlist(vl, 0);
/* Unset the parameter to force it to be recreated
* as either scalar or array depending on how many
* matches were found for the glob.
*/
- if (isset(GLOBASSIGN))
+ if (isset(GLOBASSIGN) && isstr)
unsetparam(name);
}
if (errflag) {