about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/compmatch.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c6affa01e..fbf1a4aab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-18  Peter Stephenson  <pws@csr.com>
+
+	* 24406: Src/Zle/compmatch.c: use deep copy of Cline structure
+	to avoid it containing itself.
+
 2008-01-17  Peter Stephenson  <pws@csr.com>
 
 	* unposted: Completion/Unix/Command/_perforce: a few minor
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index 6dff2243e..bf9d2cb0d 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -2003,8 +2003,8 @@ sub_join(Cline a, Cline b, Cline e, int anew)
 	ca = a->prefix;
 
 	while (n) {
-	    e->prefix = cp_cline(n, 0);
-	    a->prefix = cp_cline(ca, 0);
+	    e->prefix = cp_cline(n, 1);
+	    a->prefix = cp_cline(ca, 1);
 
 	    if (anew) {
 		int f = e->flags;