mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.1798: Vim9: trinary operator condition is too permissive
Problem: Vim9: trinary operator condition is too permissive. Solution: Use tv_get_bool_chk().
This commit is contained in:
@@ -1908,6 +1908,7 @@ call_def_function(
|
||||
{
|
||||
tv = STACK_TV_BOT(-1);
|
||||
if (when == JUMP_IF_COND_FALSE
|
||||
|| when == JUMP_IF_FALSE
|
||||
|| when == JUMP_IF_COND_TRUE)
|
||||
{
|
||||
SOURCING_LNUM = iptr->isn_lnum;
|
||||
@@ -3403,7 +3404,7 @@ ex_disassemble(exarg_T *eap)
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when "tv" is not falsey: non-zero, non-empty string, non-empty
|
||||
* Return TRUE when "tv" is not falsy: non-zero, non-empty string, non-empty
|
||||
* list, etc. Mostly like what JavaScript does, except that empty list and
|
||||
* empty dictionary are FALSE.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user