forked from aniani/vim
patch 7.4.1654
Problem: Crash when using expand('%:S') in a buffer without a name. Solution: Don't set a NUL. (James McCoy, closes #714)
This commit is contained in:
@@ -26439,9 +26439,11 @@ repeat:
|
||||
{
|
||||
/* vim_strsave_shellescape() needs a NUL terminated string. */
|
||||
c = (*fnamep)[*fnamelen];
|
||||
(*fnamep)[*fnamelen] = NUL;
|
||||
if (c != NUL)
|
||||
(*fnamep)[*fnamelen] = NUL;
|
||||
p = vim_strsave_shellescape(*fnamep, FALSE, FALSE);
|
||||
(*fnamep)[*fnamelen] = c;
|
||||
if (c != NUL)
|
||||
(*fnamep)[*fnamelen] = c;
|
||||
if (p == NULL)
|
||||
return -1;
|
||||
vim_free(*bufp);
|
||||
|
Reference in New Issue
Block a user