Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: partial word completion



Felix Rosencrantz wrote:

> Zsh seems to crash now with this patch.  The third parameter to sub_join()
> is NULL, which causes the crash.  Here's the stack trace:
> 
> ...
> 
> Sorry not to provide a simple test case.  If you need that I can investigate
> a little more.  The error happened in a directory with many files, and
> some simple pruning didn't uncover the error.

Ouch. That was something between a typo and a thinko.

Better check the variable that will be used...

Bye
 Sven

Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.5
diff -u -r1.5 compmatch.c
--- Src/Zle/compmatch.c	2000/04/17 07:56:25	1.5
+++ Src/Zle/compmatch.c	2000/04/18 07:04:09
@@ -1893,10 +1893,10 @@
 			    for (tt = o;
 				 (to = tt->next) &&
 				     !cmp_anchors(tn, to, 1); tt = to);
-			    if (tt)
+			    if (to)
 				break;
 			}
-			if (tt) {
+			if (to) {
 			    diff = sub_join(n, o, to, 1);
 
 			    if (po)

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author