diff options
Diffstat (limited to 'src/memline.c')
-rw-r--r-- | src/memline.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/memline.c b/src/memline.c index 2a2426d672..fecd876373 100644 --- a/src/memline.c +++ b/src/memline.c @@ -780,9 +780,7 @@ ml_open_file(buf) need_wait_return = TRUE; /* call wait_return later */ ++no_wait_return; (void)EMSG2(_("E303: Unable to open swap file for \"%s\", recovery impossible"), - buf_spname(buf) != NULL - ? (char_u *)buf_spname(buf) - : buf->b_fname); + buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname); --no_wait_return; } @@ -1315,7 +1313,7 @@ ml_recover() smsg((char_u *)_("Using swap file \"%s\""), NameBuff); if (buf_spname(curbuf) != NULL) - STRCPY(NameBuff, buf_spname(curbuf)); + vim_strncpy(NameBuff, buf_spname(curbuf), MAXPATHL - 1); else home_replace(NULL, curbuf->b_ffname, NameBuff, MAXPATHL, TRUE); smsg((char_u *)_("Original file \"%s\""), NameBuff); |