comparison src/filepath.c @ 30717:aa0f7c66653c v9.0.0693

patch 9.0.0693: browse() first argument cannot be a bool Commit: https://github.com/vim/vim/commit/5a049846e4c54d70094c3f29ffbd340c75e9c50e Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 8 12:52:09 2022 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Oct 2022 14:00:03 +0200
parents 37aa9fd2ed72
children ed6acfafa17e
comparison
equal deleted inserted replaced
30716:126ee85ab88a 30717:aa0f7c66653c
2581 || check_for_string_arg(argvars, 1) == FAIL 2581 || check_for_string_arg(argvars, 1) == FAIL
2582 || check_for_string_arg(argvars, 2) == FAIL 2582 || check_for_string_arg(argvars, 2) == FAIL
2583 || check_for_string_arg(argvars, 3) == FAIL)) 2583 || check_for_string_arg(argvars, 3) == FAIL))
2584 return; 2584 return;
2585 2585
2586 save = (int)tv_get_number_chk(&argvars[0], &error); 2586 save = (int)tv_get_bool_chk(&argvars[0], &error);
2587 title = tv_get_string_chk(&argvars[1]); 2587 title = tv_get_string_chk(&argvars[1]);
2588 initdir = tv_get_string_buf_chk(&argvars[2], buf); 2588 initdir = tv_get_string_buf_chk(&argvars[2], buf);
2589 defname = tv_get_string_buf_chk(&argvars[3], buf2); 2589 defname = tv_get_string_buf_chk(&argvars[3], buf2);
2590 2590
2591 if (error || title == NULL || initdir == NULL || defname == NULL) 2591 if (error || title == NULL || initdir == NULL || defname == NULL)