mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
clang/API: copy "" if orig_save is NULL
orig_save can be NULL if ExpandOne() is misused if ExpandOne() is first called with mode "WILD_CANCEL" or "WILD_APPLY" before other modes.
This commit is contained in:
parent
5bfad093b2
commit
4d396271e1
@ -4093,9 +4093,10 @@ ExpandOne (
|
||||
}
|
||||
|
||||
if (mode == WILD_CANCEL) {
|
||||
ss = vim_strsave(orig_save);
|
||||
ss = vim_strsave(orig_save ? orig_save : (char_u *)"");
|
||||
} else if (mode == WILD_APPLY) {
|
||||
ss = vim_strsave(findex == -1 ? orig_save : xp->xp_files[findex]);
|
||||
ss = vim_strsave(findex == -1 ? (orig_save ? orig_save : (char_u *)"") :
|
||||
xp->xp_files[findex]);
|
||||
}
|
||||
|
||||
/* free old names */
|
||||
|
Loading…
Reference in New Issue
Block a user