diff src/eval.c @ 27392:ec2ba9acec1b v8.2.4224

patch 8.2.4224: Vim9: no error when using a number for map() second argument Commit: https://github.com/vim/vim/commit/1080c48ec8d672d7e9fbefb5a1255c9df09a2884 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 26 18:26:21 2022 +0000 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 https://github.com/vim/vim/issues/9630)
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 Jan 2022 19:30:03 +0100
parents 018c911eb9cf
children ab690582075a
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -291,7 +291,7 @@ eval_expr_typval(typval_T *expr, typval_
     }
     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);