summaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-25 15:11:11 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-25 15:11:11 +0200
commit0fe849a13b4c0753d6b2424783879696a1fd4421 (patch)
tree57f339bfc668976bbcb289f88516747dd3ec005e /src/memline.c
parent0ad014c8a0af88e1434650b3d7e0122fb7ff58f5 (diff)
downloadvim-git-0fe849a13b4c0753d6b2424783879696a1fd4421.tar.gz
Better fix for memory access in recovery. (Dominique Pelle)
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/memline.c b/src/memline.c
index 148da61d0..ce1592637 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1170,6 +1170,10 @@ ml_recover()
buf->b_ml.ml_line_lnum = 0; /* no cached line */
buf->b_ml.ml_locked = NULL; /* no locked block */
buf->b_ml.ml_flags = 0;
+#ifdef FEAT_CRYPT
+ buf->b_p_key = empty_option;
+ buf->b_p_cm = empty_option;
+#endif
/*
* open the memfile from the old swap file
@@ -1187,8 +1191,6 @@ ml_recover()
buf->b_ml.ml_mfp = mfp;
#ifdef FEAT_CRYPT
mfp->mf_buffer = buf;
- buf->b_p_key = empty_option;
- buf->b_p_cm = empty_option;
#endif
/*