diff src/evalfunc.c @ 26731:7f4cc4e58f75 v8.2.3894

patch 8.2.3894: Vim9: no proper type check for first argument of call() Commit: https://github.com/vim/vim/commit/223d0a6bc8dc68039ceb6660de9576fafe178d73 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 25 19:29:21 2021 +0000 patch 8.2.3894: Vim9: no proper type check for first argument of call() Problem: Vim9: no proper type check for first argument of call(). Solution: Add specific type check.
author Bram Moolenaar <Bram@vim.org>
date Sat, 25 Dec 2021 20:30:03 +0100
parents 9c9b8d95b05f
children 3aa38eaa5a11
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -2858,7 +2858,8 @@ f_call(typval_T *argvars, typval_T *rett
     dict_T	*selfdict = NULL;
 
     if (in_vim9script()
-	    && (check_for_list_arg(argvars, 1) == FAIL
+	    && (check_for_string_or_func_arg(argvars, 0) == FAIL
+		|| check_for_list_arg(argvars, 1) == FAIL
 		|| check_for_opt_dict_arg(argvars, 2) == FAIL))
 	return;