forked from aniani/vim
patch 8.2.0032: MS-Windows: test for blank job fails
Problem: MS-Windows: test for blank job fails Solution: Check before escaping.
This commit is contained in:
@@ -5921,7 +5921,7 @@ job_start(
|
||||
{
|
||||
// Command is a string.
|
||||
cmd = argvars[0].vval.v_string;
|
||||
if (cmd == NULL || *cmd == NUL)
|
||||
if (cmd == NULL || *skipwhite(cmd) == NUL)
|
||||
{
|
||||
emsg(_(e_invarg));
|
||||
goto theend;
|
||||
@@ -5945,13 +5945,12 @@ job_start(
|
||||
goto theend;
|
||||
|
||||
// Empty command is invalid.
|
||||
#ifdef USE_ARGV
|
||||
if (argc == 0 || *skipwhite((char_u *)argv[0]) == NUL)
|
||||
{
|
||||
emsg(_(e_invarg));
|
||||
goto theend;
|
||||
}
|
||||
#else
|
||||
#ifndef USE_ARGV
|
||||
if (win32_build_cmd(l, &ga) == FAIL)
|
||||
goto theend;
|
||||
cmd = ga.ga_data;
|
||||
|
Reference in New Issue
Block a user