mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
fix(completion): check that healthcheck name is string (#28458)
This commit is contained in:
@@ -2598,7 +2598,8 @@ static char *get_healthcheck_names(expand_T *xp FUNC_ATTR_UNUSED, int idx)
|
||||
last_gen = get_cmdline_last_prompt_id();
|
||||
}
|
||||
|
||||
if (names.type == kObjectTypeArray && idx < (int)names.data.array.size) {
|
||||
if (names.type == kObjectTypeArray && idx < (int)names.data.array.size
|
||||
&& names.data.array.items[idx].type == kObjectTypeString) {
|
||||
return names.data.array.items[idx].data.string.data;
|
||||
}
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user