patch 8.2.0168: Coverity warning for assigning NULL to an option
Problem: Coverity warning for assigning NULL to an option.
Solution: Use empty string instead of NULL.
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 6865ba1..480f1ec 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -625,7 +625,11 @@
--ectx.ec_stack.ga_len;
tv = STACK_TV_BOT(0);
if (tv->v_type == VAR_STRING)
+ {
s = tv->vval.v_string;
+ if (s == NULL)
+ s = (char_u *)"";
+ }
else if (tv->v_type == VAR_NUMBER)
n = tv->vval.v_number;
else