0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.3.450

Problem:    Win32: Still a problem with "!start /b".
Solution:   Fix pointer use. (Yasuhiro Matsumoto)
This commit is contained in:
Bram Moolenaar
2012-02-22 15:34:08 +01:00
parent 42ec656524
commit ee7d100091
2 changed files with 8 additions and 4 deletions

View File

@@ -4008,21 +4008,23 @@ mch_call_shell(
if (flags != CREATE_NEW_CONSOLE)
{
char_u *subcmd;
char_u *cmd_shell = default_shell();
char_u *cmd_shell = mch_getenv("COMSPEC");
if (cmd_shell == NULL || *cmd_shell == NUL)
cmd_shell = default_shell();
subcmd = vim_strsave_escaped_ext(cmdbase, "|", '^', FALSE);
if (subcmd != NULL)
{
/* make "cmd.exe /c arguments" */
cmdlen = STRLEN(cmd_shell) + STRLEN(subcmd) + 5;
vim_free(subcmd);
newcmd = lalloc(cmdlen, TRUE);
if (newcmd != NULL)
vim_snprintf((char *)newcmd, cmdlen, "%s /c %s",
default_shell, subcmd);
cmd_shell, subcmd);
else
newcmd = cmdbase;
vim_free(subcmd);
}
}