Bram Moolenaar wrote:
Patch 7.3.146
Problem: It's possible to assign to a read-only member of a dict.
It's possible to create a global variable "0". (ZyX)
It's possible to add a v: variable with ":let v:.name = 1".
Solution: Add check for dict item being read-only.
Check the name of g: variables.
Disallow adding v: variables.
Files: src/eval.c
It is still possible to create such variable with extend().
call extend(g:, {"f":function('printf')})
echo f('%s', 'this is printf')
call extend(g:, {"0":0})
echo g:0
call extend(v:, {"x":1})
echo v:x
--
Yukihiro Nakadaira - [email protected]
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php