patch 8.2.3205: Coverity reports a null pointer dereference
Problem: Coverity reports a null pointer dereference.
Solution: Change the logic to avoid Coverity gets confused.
diff --git a/src/version.c b/src/version.c
index bd36437..95c9971 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3205,
+/**/
3204,
/**/
3203,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 2399434..fada134 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -5175,14 +5175,14 @@
cctx->ctx_lnum = start_ctx_lnum;
status = check_ppconst_bool(ppconst);
- if (status == OK)
+ if (status != FAIL)
{
// TODO: use ppconst if the value is a constant
generate_ppconst(cctx, ppconst);
// Every part must evaluate to a bool.
- status = (bool_on_stack(cctx));
- if (status == OK)
+ status = bool_on_stack(cctx);
+ if (status != FAIL)
status = ga_grow(&end_ga, 1);
}
cctx->ctx_lnum = save_lnum;