diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2024-03-22 19:37:29 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-03-22 19:37:29 +0100 |
commit | 5d77364e4afe69b28f6d8b3493595c5c6fc056b8 (patch) | |
tree | 396b20268dea90b39b78b925551373c5efe98260 /src/vim9expr.c | |
parent | 8e37daf620d951ce13187f62dd8a03c7abc4fb22 (diff) |
patch 9.1.0197: Vim9: problem evaluating negated boolean logicv9.1.0197
Problem: Vim9: problem evaluating negated boolean logic
(lxhillwind)
Solution: Don't clear the first value on short circuit evaluation
(Yegappan Lakshmanan)
fixes: #14265
closes: #14269
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/vim9expr.c')
-rw-r--r-- | src/vim9expr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vim9expr.c b/src/vim9expr.c index ee9712bfd9..9d67aead59 100644 --- a/src/vim9expr.c +++ b/src/vim9expr.c @@ -2779,7 +2779,7 @@ compile_expr9( if (compile_subscript(arg, cctx, start_leader, &end_leader, ppconst) == FAIL) return FAIL; - if (ppconst->pp_used > 0) + if ((ppconst->pp_used > 0) && (cctx->ctx_skip != SKIP_YES)) { // apply the '!', '-' and '+' before the constant rettv = &ppconst->pp_tv[ppconst->pp_used - 1]; |