mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-08-31 21:31:22 +02:00
don't use compsuffix when it might be freed; use the right variable in that loop there, dammit (15433)
This commit is contained in:
parent
facff10b11
commit
79dbcc8382
2 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2001-07-20 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
|
* 15433: Src/Zle/computil.c: don't use compsuffix when it might
|
||||||
|
be freed; use the right variable in that loop there, dammit
|
||||||
|
|
||||||
2001-07-19 Sven Wischnowsky <wischnow@zsh.org>
|
2001-07-19 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
* 15415: Completion/Base/Utility/_describe, Src/Zle/computil.c:
|
* 15415: Completion/Base/Utility/_describe, Src/Zle/computil.c:
|
||||||
|
|
|
@ -2615,19 +2615,21 @@ cv_parse_word(Cvdef d)
|
||||||
ign = strlen(as);
|
ign = strlen(as);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
more = dupstring(more);
|
||||||
|
|
||||||
if (ign)
|
if (ign)
|
||||||
ignore_suffix(ign);
|
ignore_suffix(ign);
|
||||||
|
|
||||||
while (more && *more) {
|
while (more && *more) {
|
||||||
if ((val = cv_next(d, &str, &arg))) {
|
if ((val = cv_next(d, &more, &arg))) {
|
||||||
zaddlinknode(state.vals, ztrdup(val->name));
|
zaddlinknode(state.vals, ztrdup(val->name));
|
||||||
if (arg) {
|
if (arg) {
|
||||||
if (str) {
|
if (more) {
|
||||||
char sav = str[-1];
|
char sav = more[-1];
|
||||||
|
|
||||||
str[-1] = '\0';
|
more[-1] = '\0';
|
||||||
zaddlinknode(state.vals, ztrdup(arg));
|
zaddlinknode(state.vals, ztrdup(arg));
|
||||||
str[-1] = sav;
|
more[-1] = sav;
|
||||||
} else {
|
} else {
|
||||||
zaddlinknode(state.vals, tricat(arg, compsuffix, ""));
|
zaddlinknode(state.vals, tricat(arg, compsuffix, ""));
|
||||||
nosfx = 1;
|
nosfx = 1;
|
||||||
|
|
Loading…
Reference in a new issue