Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
27391:5854ea4dc132 | 27392:ec2ba9acec1b |
---|---|
289 { | 289 { |
290 return exe_typval_instr(expr, rettv); | 290 return exe_typval_instr(expr, rettv); |
291 } | 291 } |
292 else | 292 else |
293 { | 293 { |
294 s = tv_get_string_buf_chk(expr, buf); | 294 s = tv_get_string_buf_chk_strict(expr, buf, TRUE); |
295 if (s == NULL) | 295 if (s == NULL) |
296 return FAIL; | 296 return FAIL; |
297 s = skipwhite(s); | 297 s = skipwhite(s); |
298 if (eval1_emsg(&s, rettv, NULL) == FAIL) | 298 if (eval1_emsg(&s, rettv, NULL) == FAIL) |
299 return FAIL; | 299 return FAIL; |