about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-02-21 18:27:04 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-02-21 18:27:04 +0000
commit9fffc58ccf6f4d1f9440904037c6f65682640d29 (patch)
treebd8b67af93c3904e576968c14a7f49f46e83ca21 /Src/exec.c
parent043fb29bc4fc3c568cbae0c5032b3bf5cff04f11 (diff)
downloadzsh-9fffc58ccf6f4d1f9440904037c6f65682640d29.tar.gz
zsh-9fffc58ccf6f4d1f9440904037c6f65682640d29.tar.xz
zsh-9fffc58ccf6f4d1f9440904037c6f65682640d29.zip
users/12632: bug unexporting special after being set for funccall
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c2
1 files changed, 2 insertions, 0 deletions
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: