1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-30 15:02:18 +01:00

fix for 15407; there may be sets without matches (15409)

This commit is contained in:
Sven Wischnowsky 2001-07-18 13:52:53 +00:00
parent 8c1b953b5a
commit 6a3e89d539
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2001-07-18 Sven Wischnowsky <wischnow@zsh.org>
* 15409: Src/Zle/computil.c: fix for 15407; there may be sets
without matches
* 15407: Completion/Base/Utility/_describe,
Completion/Zsh/Command/_zstyle, Doc/Zsh/compsys.yo,
Src/Zle/complist.c, Src/Zle/compresult.c, Src/Zle/computil.c:

View file

@ -213,7 +213,7 @@ cd_init(char *nam, char *sep, char **args, int disp)
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 @@ cd_init(char *nam, char *sep, char **args, int disp)
*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))) {