patch 8.1.1046: the "secure" variable is used inconsistently
Problem: the "secure" variable is used inconsistently. (Justin M. Keyes)
Solution: Set it to one instead of incrementing.
diff --git a/src/option.c b/src/option.c
index f9cbcbd..8149521 100644
--- a/src/option.c
+++ b/src/option.c
@@ -5151,13 +5151,12 @@
// effects in secure mode. Also when the value was
// set with the P_INSECURE flag and is not
// completely replaced.
- if (secure
+ if ((opt_flags & OPT_MODELINE)
#ifdef HAVE_SANDBOX
- || sandbox != 0
+ || sandbox != 0
#endif
- || (opt_flags & OPT_MODELINE)
- || (!value_is_replaced && (*p & P_INSECURE)))
- ++secure;
+ || (!value_is_replaced && (*p & P_INSECURE)))
+ secure = 1;
// Handle side effects, and set the global value
// for ":set" on local options. Note: when setting