summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/builtin.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 19e43c838..86f2bfa00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-03  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 22318: Src/builtin.c: uniquifying special arrays was broken.
+
+	* 22277: Test/C03traps.ztst: missed this.
+
 2006-03-02  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 22317: Src/builtins.c, Src/exec.c: exiting the shell from
diff --git a/Src/builtin.c b/Src/builtin.c
index d51149ec6..ce3aec0a2 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -1924,8 +1924,9 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func),
 	    Param apm;
 	    char **x;
 	    if (PM_TYPE(pm->flags) == PM_ARRAY) {
-		x = (*pm->gsu.a->getfn)(pm);
+		x = zarrdup((*pm->gsu.a->getfn)(pm));
 		uniqarray(x);
+		pm->gsu.a->setfn(pm, x);
 		if (pm->ename && x)
 		    arrfixenv(pm->ename, x);
 	    } else if (PM_TYPE(pm->flags) == PM_SCALAR && pm->ename &&