changeset 3367:3479ac596f6c v7.3.450

updated for version 7.3.450 Problem: Win32: Still a problem with "!start /b". Solution: Fix pointer use. (Yasuhiro Matsumoto)
author Bram Moolenaar <bram@vim.org>
date Wed, 22 Feb 2012 15:34:08 +0100
parents e9445f083625
children 0d233a29039a
files src/os_win32.c src/version.c
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -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);
 		}
 	    }
 
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    450,
+/**/
     449,
 /**/
     448,