From 9fffc58ccf6f4d1f9440904037c6f65682640d29 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 21 Feb 2008 18:27:04 +0000 Subject: users/12632: bug unexporting special after being set for funccall --- ChangeLog | 5 +++++ Src/exec.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8be16fa63..22a0aa239 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-21 Peter Stephenson + + * users/12632: Src/exec.c: bug unexporting special parameter + after "SPECIAL=stuff funccall". + 2008-02-19 Peter Stephenson * 24572: Doc/Zsh/calsys.yo, Functions/Calendar/calendar_add: diff --git a/Src/exec.c b/Src/exec.c index 438e30d0d..83479bc88 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3113,6 +3113,8 @@ restore_params(LinkList restorelist, LinkList removelist) DPUTS(!tpm || PM_TYPE(pm->node.flags) != PM_TYPE(tpm->node.flags) || !(pm->node.flags & PM_SPECIAL), "BUG: in restoring special parameters"); + if (!pm->env && tpm->env) + delenv(tpm); tpm->node.flags = pm->node.flags; switch (PM_TYPE(pm->node.flags)) { case PM_SCALAR: -- cgit 1.4.1