0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2664: Vim9: not enough function arguments checked for string

Problem:    Vim9: not enough function arguments checked for string.
Solution:   Check in balloon functions.  Refactor function arguments.
This commit is contained in:
Bram Moolenaar
2021-03-27 18:59:25 +01:00
parent 79efa2e3b3
commit 32105ae88f
7 changed files with 58 additions and 29 deletions

View File

@@ -5551,7 +5551,7 @@ f_setcellwidths(typval_T *argvars, typval_T *rettv UNUSED)
void
f_charclass(typval_T *argvars, typval_T *rettv UNUSED)
{
if (check_for_string(&argvars[0], 1) == FAIL)
if (check_for_string_arg(argvars, 0) == FAIL)
return;
rettv->vval.v_number = mb_get_class(argvars[0].vval.v_string);
}