File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -26439,9 +26439,11 @@ modify_fname(
2643926439 {
2644026440 /* vim_strsave_shellescape() needs a NUL terminated string. */
2644126441 c = (*fnamep)[*fnamelen];
26442- (*fnamep)[*fnamelen] = NUL;
26442+ if (c != NUL)
26443+ (*fnamep)[*fnamelen] = NUL;
2644326444 p = vim_strsave_shellescape(*fnamep, FALSE, FALSE);
26444- (*fnamep)[*fnamelen] = c;
26445+ if (c != NUL)
26446+ (*fnamep)[*fnamelen] = c;
2644526447 if (p == NULL)
2644626448 return -1;
2644726449 vim_free(*bufp);
Original file line number Diff line number Diff line change @@ -41,3 +41,9 @@ func Test_fnamemodify()
4141 call assert_equal (" 'abc\\ \n def'" , fnamemodify (" abc\n def" , ' :S' ))
4242 set shell &
4343endfunc
44+
45+ func Test_expand ()
46+ new
47+ call assert_equal (" " , expand (' %:S' ))
48+ quit
49+ endfunc
Original file line number Diff line number Diff line change @@ -748,6 +748,8 @@ static char *(features[]) =
748748
749749static int included_patches [] =
750750{ /* Add new patch number below this line */
751+ /**/
752+ 1654 ,
751753/**/
752754 1653 ,
753755/**/
You can’t perform that action at this time.
0 commit comments