forked from aniani/vim
updated for version 7.4.451
Problem: Calling system() with empty input gives an error for writing the temp file. Solution: Do not try writing if the string length is zero. (Olaf Dabrunz)
This commit is contained in:
parent
9c8d9e1952
commit
1ecfd9cb09
@ -18638,13 +18638,16 @@ get_cmd_output_as_rettv(argvars, rettv, retlist)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
size_t len;
|
||||||
|
|
||||||
p = get_tv_string_buf_chk(&argvars[1], buf);
|
p = get_tv_string_buf_chk(&argvars[1], buf);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
{
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
goto errret; /* type error; errmsg already given */
|
goto errret; /* type error; errmsg already given */
|
||||||
}
|
}
|
||||||
if (fwrite(p, STRLEN(p), 1, fd) != 1)
|
len = STRLEN(p);
|
||||||
|
if (len > 0 && fwrite(p, len, 1, fd) != 1)
|
||||||
err = TRUE;
|
err = TRUE;
|
||||||
}
|
}
|
||||||
if (fclose(fd) != 0)
|
if (fclose(fd) != 0)
|
||||||
|
@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
451,
|
||||||
/**/
|
/**/
|
||||||
450,
|
450,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user