0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4224: Vim9: no error when using a number for map() second argument

Problem:    Vim9: no error when using a number for map() second argument
Solution:   Disallow number to string conversion. (closes #9630)
This commit is contained in:
Bram Moolenaar
2022-01-26 18:26:21 +00:00
parent 1a804528ab
commit 1080c48ec8
4 changed files with 50 additions and 20 deletions

View File

@@ -291,7 +291,7 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
}
else
{
s = tv_get_string_buf_chk(expr, buf);
s = tv_get_string_buf_chk_strict(expr, buf, TRUE);
if (s == NULL)
return FAIL;
s = skipwhite(s);