Permalink
Browse files

patch 8.0.1746: MS-Windows: channel tests fail

Problem:    MS-Windows: channel tests fail.
Solution:   Make a copy of the command before splitting it.
  • Loading branch information...
brammool committed Apr 21, 2018
1 parent 2060892 commit a69b39511d769bc88f0854bd026556fdb9bd2817
Showing with 12 additions and 2 deletions.
  1. +10 −2 src/channel.c
  2. +2 −0 src/version.c
@@ -5563,19 +5563,27 @@ job_start(typval_T *argvars, char **argv_arg, jobopt_T *opt_arg)
#endif
if (argvars[0].v_type == VAR_STRING)
{
char_u *cmd_copy;
/* Command is a string. */
cmd = argvars[0].vval.v_string;
if (cmd == NULL || *cmd == NUL)
{
EMSG(_(e_invarg));
goto theend;
}
/* This will modify "cmd". */
if (mch_parse_cmd(cmd, FALSE, &argv, &argc) == FAIL)
/* Make a copy, parsing will modify "cmd". */
cmd_copy = vim_strsave(cmd);
if (cmd_copy == NULL
|| mch_parse_cmd(cmd_copy, FALSE, &argv, &argc) == FAIL)
{
vim_free(cmd_copy);
goto theend;
}
for (i = 0; i < argc; i++)
argv[i] = (char *)vim_strsave((char_u *)argv[i]);
argv[argc] = NULL;
vim_free(cmd_copy);
}
else if (argvars[0].v_type != VAR_LIST
|| argvars[0].vval.v_list == NULL
@@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1746,
/**/
1745,
/**/

0 comments on commit a69b395

Please sign in to comment.