1
0
forked from aniani/vim

patch 8.2.1571: Vim9: count() third argument cannot be "true"

Problem:    Vim9: count() third argument cannot be "true".
Solution:   use tv_get_bool_chk(). (closes #6818)
This commit is contained in:
Bram Moolenaar
2020-09-02 21:31:22 +02:00
parent 9d8bfae50f
commit 119f557230
4 changed files with 8 additions and 2 deletions

View File

@@ -2167,7 +2167,7 @@ f_count(typval_T *argvars, typval_T *rettv)
int error = FALSE;
if (argvars[2].v_type != VAR_UNKNOWN)
ic = (int)tv_get_number_chk(&argvars[2], &error);
ic = (int)tv_get_bool_chk(&argvars[2], &error);
if (argvars[0].v_type == VAR_STRING)
{