diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-10-12 07:38:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-12 07:38:56 +0800 |
commit | 3cbb02ce77087a820decd1a724a6e8b666e0ca36 (patch) | |
tree | 2cd4ee786677f4730e8526158efd6ecc13e0eb6e /src/nvim/eval/typval.c | |
parent | f4c85b9ad184dc31aa192588c4e1b068f5a5fbc5 (diff) | |
download | rneovim-3cbb02ce77087a820decd1a724a6e8b666e0ca36.tar.gz rneovim-3cbb02ce77087a820decd1a724a6e8b666e0ca36.tar.bz2 rneovim-3cbb02ce77087a820decd1a724a6e8b666e0ca36.zip |
vim-patch:8.2.3064: Vim9: in script cannot set item in uninitialized list (#25605)
Problem: Vim9: in script cannot set item in uninitialized list.
Solution: When a list is NULL allocate an empty one. (closes vim/vim#8461)
https://github.com/vim/vim/commit/e65081d1b591f16dc6e380a830d87565c5eb7b03
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r-- | src/nvim/eval/typval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index ea118e4bc6..9fca4adcf7 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -625,7 +625,7 @@ listitem_T *tv_list_check_range_index_one(list_T *const l, int *const n1, const listitem_T *li = tv_list_find_index(l, n1); if (li == NULL) { if (!quiet) { - semsg(_(e_list_index_out_of_range_nr), (int64_t)n1); + semsg(_(e_list_index_out_of_range_nr), (int64_t)(*n1)); } return NULL; } |