diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-03-24 14:02:04 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-03-24 14:02:04 +0100 |
commit | 82b033eff82d3ed0da77fd5f5a1c023766acabba (patch) | |
tree | 044982426b63e83769cda707b56da4d5c2b9d2b5 /src/option.c | |
parent | 63dbfd33c1d47400c62775842b5b750ee69e2383 (diff) | |
download | vim-git-82b033eff82d3ed0da77fd5f5a1c023766acabba.tar.gz |
patch 8.1.1046: the "secure" variable is used inconsistentlyv8.1.1046
Problem: the "secure" variable is used inconsistently. (Justin M. Keyes)
Solution: Set it to one instead of incrementing.
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/option.c b/src/option.c index f9cbcbd7b..8149521fc 100644 --- a/src/option.c +++ b/src/option.c @@ -5151,13 +5151,12 @@ do_set( // 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 |