mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
*: Provide list length when allocating lists
This commit is contained in:
@@ -783,7 +783,7 @@ bool object_to_vim(Object obj, typval_T *tv, Error *err)
|
||||
break;
|
||||
|
||||
case kObjectTypeArray: {
|
||||
list_T *const list = tv_list_alloc();
|
||||
list_T *const list = tv_list_alloc((ptrdiff_t)obj.data.array.size);
|
||||
|
||||
for (uint32_t i = 0; i < obj.data.array.size; i++) {
|
||||
Object item = obj.data.array.items[i];
|
||||
|
Reference in New Issue
Block a user