Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: long/short options
- X-seq: zsh-workers 15409
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: Re: long/short options
- Date: Wed, 18 Jul 2001 15:51:09 +0200 (MET DST)
- In-reply-to: <000001c10f90$0877a2d0$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> bor@itsrm2% zsh
> bor@itsrm2% gdiff -bTAB
> zsh: bus error (core dumped) zsh
Ouch. Sets without matches are possible.
Sorry. Thanks.
Bye
Sven
Index: Src/Zle/computil.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v
retrieving revision 1.63
diff -u -r1.63 computil.c
--- Src/Zle/computil.c 2001/07/18 13:10:10 1.63
+++ Src/Zle/computil.c 2001/07/18 13:50:04
@@ -213,7 +213,7 @@
freecdsets(cd_state.sets);
return 1;
}
- for (strp = &(set->strs); *ap; ap++) {
+ for (str = NULL, strp = &(set->strs); *ap; ap++) {
*strp = str = (Cdstr) zalloc(sizeof(*str));
strp = &(str->next);
@@ -231,7 +231,8 @@
*tmp = '\0';
str->str = str->match = ztrdup(rembslash(*ap));
}
- str->next = NULL;
+ if (str)
+ str->next = NULL;
if (*++args && **args != '-') {
if (!(ap = get_user_var(*args))) {
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author