Patch 7.3.450 (after 7.3.448)
Problem:    Win32: Still a problem with "!start /b".
Solution:   Fix pointer use. (Yasuhiro Matsumoto)
Files:      src/os_win32.c


*** ../vim-7.3.449/src/os_win32.c       2012-02-22 13:07:02.000000000 +0100
--- src/os_win32.c      2012-02-22 15:29:56.000000000 +0100
***************
*** 4008,4028 ****
            if (flags != CREATE_NEW_CONSOLE)
            {
                char_u  *subcmd;
!               char_u  *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);
                    else
                        newcmd = cmdbase;
                }
            }
  
--- 4008,4030 ----
            if (flags != CREATE_NEW_CONSOLE)
            {
                char_u  *subcmd;
!               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;
                    newcmd = lalloc(cmdlen, TRUE);
                    if (newcmd != NULL)
                        vim_snprintf((char *)newcmd, cmdlen, "%s /c %s",
!                                                      cmd_shell, subcmd);
                    else
                        newcmd = cmdbase;
+                   vim_free(subcmd);
                }
            }
  
*** ../vim-7.3.449/src/version.c        2012-02-22 14:58:24.000000000 +0100
--- src/version.c       2012-02-22 15:33:53.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     450,
  /**/

-- 
You are only young once, but you can stay immature indefinitely.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui