mirror of
https://github.com/vim/vim.git
synced 2025-10-16 07:24:23 -04:00
patch 8.2.3206: Vim9: argument types are not checked at compile time
Problem: Vim9: argument types are not checked at compile time. Solution: Add several more type checks. (Yegappan Lakshmanan, closes #8611)
This commit is contained in:
committed by
Bram Moolenaar
parent
1b862c466b
commit
0ad871dc4d
@@ -570,6 +570,11 @@ f_histdel(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
char_u buf[NUMBUFLEN];
|
||||
char_u *str;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_opt_string_or_number_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
str = tv_get_string_chk(&argvars[0]); // NULL on type error
|
||||
if (str == NULL)
|
||||
n = 0;
|
||||
|
Reference in New Issue
Block a user