mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.3415: Vim9: not all function argument types are properly checked
Problem: Vim9: Not all function argument types are properly checked. Solution: Add and improve argument type checks. (Yegappan Lakshmanan, closes #8839)
This commit is contained in:
committed by
Bram Moolenaar
parent
80c88eac5a
commit
fc3b775055
@@ -2443,7 +2443,7 @@ f_digraph_getlist(typval_T *argvars, typval_T *rettv)
|
||||
# ifdef FEAT_DIGRAPHS
|
||||
int flag_list_all;
|
||||
|
||||
if (in_vim9script() && check_for_opt_number_arg(argvars, 0) == FAIL)
|
||||
if (in_vim9script() && check_for_opt_bool_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
if (argvars[0].v_type == VAR_UNKNOWN)
|
||||
@@ -2475,7 +2475,7 @@ f_digraph_set(typval_T *argvars, typval_T *rettv)
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_number_arg(argvars, 1) == FAIL))
|
||||
|| check_for_string_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
if (!digraph_set_common(&argvars[0], &argvars[1]))
|
||||
|
Reference in New Issue
Block a user