patch 8.2.0453: trailing space in job_start() command causes empty argument

Problem:    Trailing space in job_start() command causes empty argument.
Solution:   Ignore trailing space. (closes #5851)
diff --git a/src/misc2.c b/src/misc2.c
index 6ef420c..864d1fd 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -4242,14 +4242,14 @@
      * 1: find number of arguments
      * 2: separate them and build argv[]
      */
-    for (i = 0; i < 2; ++i)
+    for (i = 1; i <= 2; ++i)
     {
 	p = skipwhite(cmd);
 	inquote = FALSE;
 	*argc = 0;
-	for (;;)
+	while (*p != NUL)
 	{
-	    if (i == 1)
+	    if (i == 2)
 		(*argv)[*argc] = (char *)p;
 	    ++*argc;
 	    d = p;
@@ -4266,18 +4266,18 @@
 			// Second pass: Remove the backslash.
 			++p;
 		    }
-		    if (i == 1)
+		    if (i == 2)
 			*d++ = *p;
 		}
 		++p;
 	    }
 	    if (*p == NUL)
 	    {
-		if (i == 1)
+		if (i == 2)
 		    *d++ = NUL;
 		break;
 	    }
-	    if (i == 1)
+	    if (i == 2)
 		*d++ = NUL;
 	    p = skipwhite(p + 1);
 	}
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 8fa67ef..fc8b372 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -2035,4 +2035,12 @@
   unlet $VAR1
 endfunc
 
+func Test_job_trailing_space_unix()
+  CheckUnix
+  CheckExecutable cat
+  let job = job_start("cat ", #{in_io: 'null'})
+  call WaitForAssert({-> assert_equal("dead", job_status(job))})
+  call assert_equal(0, job_info(job).exitval)
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index 94fcb60..a2a2986 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    453,
+/**/
     452,
 /**/
     451,