summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-12-22 18:28:51 +0100
committerBram Moolenaar <Bram@vim.org>2019-12-22 18:28:51 +0100
commit7c2a2f869b0f5a3e36f5e7d83923a264426e434c (patch)
treef0ef19e02e508db5269418b1b67bd86a7861c0b5 /src/channel.c
parentba0a7475c52ea0ba9e083934bd328fbcbfa8d532 (diff)
downloadvim-git-7c2a2f869b0f5a3e36f5e7d83923a264426e434c.tar.gz
patch 8.2.0032: MS-Windows: test for blank job failsv8.2.0032
Problem: MS-Windows: test for blank job fails Solution: Check before escaping.
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c
index f1c2ccd33..ebbc315cc 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -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;