summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 1c0ac8580..c7a2b749e 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2953,7 +2953,7 @@ check_for_cryptkey(cryptkey, ptr, sizep, filesizep, newfile, fname, did_ask)
}
/* When starting to edit a new file which does not have encryption, clear
* the 'key' option, except when starting up (called with -x argument) */
- else if (newfile && *curbuf->b_p_key && !starting)
+ else if (newfile && *curbuf->b_p_key != NUL && !starting)
set_option_value((char_u *)"key", 0L, (char_u *)"", OPT_LOCAL);
return cryptkey;