diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-25 21:43:28 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-25 21:43:28 +0000 |
commit | 1802405d71da20dff510690bf14f6da085836125 (patch) | |
tree | eb17c5e35f51aa31716d3222fd674d77b3629db7 /src/list.c | |
parent | db8e5c21b98c5998df4ab94e0b94bd9fdaf35c83 (diff) |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/list.c b/src/list.c index 61a26a35dd..6fafef6371 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); |