about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2001-06-20 10:06:51 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2001-06-20 10:06:51 +0000
commit79ed1a0e22f0660eedbd3966ea51d74928d68d26 (patch)
tree687e69275be894efb4804e782dba077f24e894fe
parentbdea3cd76838e8f9a656c2476374f637e4e4a0d3 (diff)
downloadzsh-79ed1a0e22f0660eedbd3966ea51d74928d68d26.tar.gz
zsh-79ed1a0e22f0660eedbd3966ea51d74928d68d26.tar.xz
zsh-79ed1a0e22f0660eedbd3966ea51d74928d68d26.zip
Bug restoring saving special parameters for function scope.
-rw-r--r--ChangeLog5
-rw-r--r--Src/exec.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4969182fa..db8a6ecc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-20  Peter Stephenson  <pws@csr.com>
+
+	* 14988: Src/exec.c: names of saved special parameters need
+	to be copied.
+
 2001-06-19  Bart Schaefer  <schaefer@zsh.org>
 
 	* 14976: aczsh.m4: Add socklen_t to possible SOCKLEN_T types.
diff --git a/Src/exec.c b/Src/exec.c
index aa78a7ce6..595d26532 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2395,7 +2395,7 @@ save_params(Estate state, Wordcode pc, LinkList *restore_p, LinkList *remove_p)
 	    } else if (!(pm->flags & PM_READONLY) &&
 		       (unset(RESTRICTED) || !(pm->flags & PM_RESTRICTED))) {
 		Param tpm = (Param) zhalloc(sizeof *tpm);
-		tpm->nam = s;
+		tpm->nam = dupstring(s);
 		copyparam(tpm, pm, 1);
 		pm = tpm;
 	    }