0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.0.0693: browse() first argument cannot be a bool

Problem:    browse() first argument cannot be a bool.
Solution:   Use tv_get_bool_chk() instead of tv_get_number_chk().
            (closes #11308)
This commit is contained in:
Bram Moolenaar
2022-10-08 12:52:09 +01:00
parent b7f52f5659
commit 5a049846e4
2 changed files with 3 additions and 1 deletions

View File

@@ -2583,7 +2583,7 @@ f_browse(typval_T *argvars UNUSED, typval_T *rettv)
|| check_for_string_arg(argvars, 3) == FAIL))
return;
save = (int)tv_get_number_chk(&argvars[0], &error);
save = (int)tv_get_bool_chk(&argvars[0], &error);
title = tv_get_string_chk(&argvars[1]);
initdir = tv_get_string_buf_chk(&argvars[2], buf);
defname = tv_get_string_buf_chk(&argvars[3], buf2);