1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-29 03:31:01 +01:00

53797: fix creation of undeclared target variable through reference chain

This commit is contained in:
Philippe Altherr 2025-10-26 17:11:32 -07:00 committed by Bart Schaefer
parent 78b7629361
commit 7546c18076
3 changed files with 18 additions and 1 deletions

View file

@ -1048,7 +1048,7 @@ createparam(char *name, int flags)
(oldpm = upscope(oldpm, oldpm->base))) {
Param lastpm;
struct asgment stop;
stop.flags = PM_NAMEREF | (flags & PM_LOCAL);
stop.flags = PM_NAMEREF;
stop.name = oldpm->node.nam;
stop.value.scalar = GETREFNAME(oldpm);
lastpm = (Param)resolve_nameref(oldpm, &stop);