summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-25 21:43:28 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-25 21:43:28 +0000
commit1802405d71da20dff510690bf14f6da085836125 (patch)
treeeb17c5e35f51aa31716d3222fd674d77b3629db7 /src/list.c
parentdb8e5c21b98c5998df4ab94e0b94bd9fdaf35c83 (diff)
downloadvim-git-1802405d71da20dff510690bf14f6da085836125.tar.gz
patch 8.2.3897: Vim9: second argument of map() and filter() not checkedv8.2.3897
Problem: Vim9: the second argument of map() and filter() is not checked at compile time. Solution: Add more specific type check for the second argument.
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/list.c b/src/list.c
index 61a26a35d..6fafef637 100644
--- a/src/list.c
+++ b/src/list.c
@@ -2280,7 +2280,7 @@ filter_map_one(
// filter(): when expr is zero remove the item
if (in_vim9script())
- *remp = !tv2bool(newtv);
+ *remp = !tv_get_bool_chk(newtv, &error);
else
*remp = (tv_get_number_chk(newtv, &error) == 0);
clear_tv(newtv);