Commit 12014556 authored by Barton E. Schaefer's avatar Barton E. Schaefer

32208: always reset pathchecked when the path array is modified

parent ea55ea03
2013-12-30 Barton E. Schaefer <schaefer@zsh.org>
* 32208: Src/params.c: always reset pathchecked when the path
array is modified in arrvarsetfn(), to avoid bad dereference
* 32205: Completion/Zsh/Command/_cd: skip cdpath search when
the prefix begins with "../" (bug introduced by 31714)
......
......@@ -3380,8 +3380,12 @@ arrvarsetfn(Param pm, char **x)
*dptr = mkarray(NULL);
else
*dptr = x;
if (pm->ename && x)
arrfixenv(pm->ename, x);
if (pm->ename) {
if (x)
arrfixenv(pm->ename, x);
else if (*dptr == path)
pathchecked = path;
}
}
/**/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment