To: vim_dev@googlegroups.com Subject: Patch 8.2.0032 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0032 (after 8.2.0031) Problem: MS-Windows: test for blank job fails Solution: Check before escaping. Files: src/channel.c, src/testdir/test_channel.vim *** ../vim-8.2.0031/src/channel.c 2019-12-22 16:09:02.386962319 +0100 --- src/channel.c 2019-12-22 18:26:31.340688869 +0100 *************** *** 5921,5927 **** { // Command is a string. cmd = argvars[0].vval.v_string; ! if (cmd == NULL || *cmd == NUL) { emsg(_(e_invarg)); goto theend; --- 5921,5927 ---- { // Command is a string. cmd = argvars[0].vval.v_string; ! if (cmd == NULL || *skipwhite(cmd) == NUL) { emsg(_(e_invarg)); goto theend; *************** *** 5945,5957 **** goto theend; // Empty command is invalid. - #ifdef USE_ARGV if (argc == 0 || *skipwhite((char_u *)argv[0]) == NUL) { emsg(_(e_invarg)); goto theend; } ! #else if (win32_build_cmd(l, &ga) == FAIL) goto theend; cmd = ga.ga_data; --- 5945,5956 ---- goto theend; // Empty command is invalid. if (argc == 0 || *skipwhite((char_u *)argv[0]) == NUL) { emsg(_(e_invarg)); goto theend; } ! #ifndef USE_ARGV if (win32_build_cmd(l, &ga) == FAIL) goto theend; cmd = ga.ga_data; *** ../vim-8.2.0031/src/testdir/test_channel.vim 2019-12-22 16:09:02.390962306 +0100 --- src/testdir/test_channel.vim 2019-12-22 18:27:52.620573909 +0100 *************** *** 1962,1967 **** --- 1962,1969 ---- " This was crashing on MS-Windows. call assert_fails('let job = job_start([""])', 'E474:') call assert_fails('let job = job_start([" "])', 'E474:') + call assert_fails('let job = job_start("")', 'E474:') + call assert_fails('let job = job_start(" ")', 'E474:') endfunc " Do this last, it stops any channel log. *** ../vim-8.2.0031/src/version.c 2019-12-22 16:09:02.390962306 +0100 --- src/version.c 2019-12-22 18:27:27.368612385 +0100 *************** *** 744,745 **** --- 744,747 ---- { /* Add new patch number below this line */ + /**/ + 32, /**/ -- LAUNCELOT leaps into SHOT with a mighty cry and runs the GUARD through and hacks him to the floor. Blood. Swashbuckling music (perhaps). LAUNCELOT races through into the castle screaming. SECOND SENTRY: Hey! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///