Mercurial > vim
diff src/screen.c @ 3839:8115f449a574 v7.3.677
updated for version 7.3.677
Problem: buf_spname() is used inconsistently.
Solution: Make the return type a char_u pointer. Check the size of the
returned string.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 03 Oct 2012 18:25:00 +0200 |
parents | c0256c4bd91e |
children | cd59ba19985a |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -9876,7 +9876,7 @@ get_trans_bufname(buf) buf_T *buf; { if (buf_spname(buf) != NULL) - STRCPY(NameBuff, buf_spname(buf)); + vim_strncpy(NameBuff, buf_spname(buf), MAXPATHL - 1); else home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE); trans_characters(NameBuff, MAXPATHL);