Mercurial > vim
diff src/misc1.c @ 25338:e2be9f3c5907 v8.2.3206
patch 8.2.3206: Vim9: argument types are not checked at compile time
Commit: https://github.com/vim/vim/commit/0ad871dc4dfe1026e14931a55c225616b63f4c5b
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Fri Jul 23 20:37:56 2021 +0200
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 https://github.com/vim/vim/issues/8611)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 23 Jul 2021 20:45:05 +0200 |
parents | 34a6db7af738 |
children | e8e2c4d33b9b |
line wrap: on
line diff
--- a/src/misc1.c +++ b/src/misc1.c @@ -2351,6 +2351,11 @@ get_cmd_output_as_rettv( if (check_restricted() || check_secure()) goto errret; + if (in_vim9script() + && (check_for_string_arg(argvars, 0) == FAIL + || check_for_opt_string_or_number_arg(argvars, 1) == FAIL)) + return; + if (argvars[1].v_type != VAR_UNKNOWN) { /*