Mercurial > vim
diff src/buffer.c @ 416:3da34f87c760
updated for version 7.0109
author | vimboss |
---|---|
date | Mon, 18 Jul 2005 21:40:44 +0000 |
parents | 6f42fce917a8 |
children | 7472c565592a |
line wrap: on
line diff
--- a/src/buffer.c +++ b/src/buffer.c @@ -3036,9 +3036,8 @@ maketitle() else { p = transstr(gettail(curbuf->b_fname)); - STRNCPY(buf, p, IOSIZE - 100); + vim_strncpy(buf, p, IOSIZE - 100); vim_free(p); - buf[IOSIZE - 100] = NUL; /* in case it was too long */ } switch (bufIsChanged(curbuf) @@ -3071,15 +3070,15 @@ maketitle() p = gettail_sep(buf + off); if (p == buf + off) /* must be a help buffer */ - STRCPY(buf + off, _("help")); + vim_strncpy(buf + off, (char_u *)_("help"), + IOSIZE - off - 1); else *p = NUL; /* translate unprintable chars */ p = transstr(buf + off); - STRNCPY(buf + off, p, IOSIZE - off); + vim_strncpy(buf + off, p, IOSIZE - off - 1); vim_free(p); - buf[IOSIZE - 1] = NUL; /* in case it was too long */ STRCAT(buf, ")"); }