mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-22 01:12:01 +01:00
33816, 33819: GLOB_ASSIGN changes integer and floating type variables to string scalars
This commit is contained in:
parent
389954beec
commit
49d6aace41
3 changed files with 37 additions and 1 deletions
10
Src/exec.c
10
Src/exec.c
|
|
@ -2243,8 +2243,16 @@ addvars(Estate state, Wordcode pc, int addflags)
|
|||
state->pc = opc;
|
||||
return;
|
||||
}
|
||||
if (isset(GLOBASSIGN) || !isstr)
|
||||
if (!isstr || (isset(GLOBASSIGN) &&
|
||||
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))
|
||||
unsetparam(name);
|
||||
}
|
||||
if (errflag) {
|
||||
state->pc = opc;
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue