Mercurial > vim
diff src/vim9execute.c @ 22500:ef8a3177edc1 v8.2.1798
patch 8.2.1798: Vim9: trinary operator condition is too permissive
Commit: https://github.com/vim/vim/commit/1310660557470a669cc64b359e20666b116e5dbd
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 4 16:06:05 2020 +0200
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().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Oct 2020 16:15:04 +0200 |
parents | 4c21f7f6f9e3 |
children | c3e3c5707fe9 |
line wrap: on
line diff
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -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. */