1
0
forked from aniani/vim

updated for version 7.3.161

Problem:    Items on the stack may be too big.
Solution:   Make items static or allocate them.
This commit is contained in:
Bram Moolenaar
2011-04-11 21:35:11 +02:00
parent ef9d6aa70d
commit d9462e394a
14 changed files with 273 additions and 121 deletions

View File

@@ -6023,15 +6023,19 @@ make_bom(buf, name)
shorten_fname1(full_path)
char_u *full_path;
{
char_u dirname[MAXPATHL];
char_u *dirname;
char_u *p = full_path;
dirname = alloc(MAXPATHL);
if (dirname == NULL)
return full_path;
if (mch_dirname(dirname, MAXPATHL) == OK)
{
p = shorten_fname(full_path, dirname);
if (p == NULL || *p == NUL)
p = full_path;
}
vim_free(dirname);
return p;
}
#endif