summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-18 22:15:04 +0100
committerBram Moolenaar <Bram@vim.org>2021-03-18 22:15:04 +0100
commit108cf0153c5770e343aec9e2390acdaa4a0b149a (patch)
treedef8f451bc49e4e5d7b98e5cc7e33dd52aaffb29 /src/list.c
parent4b3e1964d85a25ac7b2202094d1abf27ab93cc23 (diff)
downloadvim-git-108cf0153c5770e343aec9e2390acdaa4a0b149a.tar.gz
patch 8.2.2621: typval2type() cannot handle recursive structuresv8.2.2621
Problem: typval2type() cannot handle recursive structures. Solution: Use copyID. (closes #7979)
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/list.c b/src/list.c
index b1080dee0..873f9e63d 100644
--- a/src/list.c
+++ b/src/list.c
@@ -2052,7 +2052,7 @@ filter_map(typval_T *argvars, typval_T *rettv, filtermap_T filtermap)
{
// Check that map() does not change the type of the dict.
ga_init2(&type_list, sizeof(type_T *), 10);
- type = typval2type(argvars, &type_list);
+ type = typval2type(argvars, get_copyID(), &type_list);
}
if (argvars[0].v_type == VAR_BLOB)
@@ -2558,7 +2558,7 @@ extend(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg, int is_new)
{
// Check that map() does not change the type of the dict.
ga_init2(&type_list, sizeof(type_T *), 10);
- type = typval2type(argvars, &type_list);
+ type = typval2type(argvars, get_copyID(), &type_list);
}
if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST)