Replace vim_strncpy calls: misc2.c

This commit is contained in:
Douglas Schneider
2014-05-25 18:49:23 -06:00
committed by Justin M. Keyes
parent d6e9b3caad
commit a328bcfb47

View File

@@ -375,7 +375,7 @@ int vim_chdirfile(char_u *fname)
{ {
char_u dir[MAXPATHL]; char_u dir[MAXPATHL];
vim_strncpy(dir, fname, MAXPATHL - 1); STRLCPY(dir, fname, MAXPATHL);
*path_tail_with_sep(dir) = NUL; *path_tail_with_sep(dir) = NUL;
return os_chdir((char *)dir) == 0 ? OK : FAIL; return os_chdir((char *)dir) == 0 ? OK : FAIL;
} }