patch 8.1.2293: join adds trailing space when second line is empty

Problem:    Join adds trailing space when second line is empty. (Brennan
            Vincent)
Solution:   Do not add a trailing space.
diff --git a/src/ops.c b/src/ops.c
index 85e99f7..258b271 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1999,7 +1999,8 @@
 	if (insert_space && t > 0)
 	{
 	    curr = skipwhite(curr);
-	    if (*curr != ')' && currsize != 0 && endcurr1 != TAB
+	    if (*curr != NUL && *curr != ')'
+		    && currsize != 0 && endcurr1 != TAB
 		    && (!has_format_option(FO_MBYTE_JOIN)
 			|| (mb_ptr2char(curr) < 0x100 && endcurr1 < 0x100))
 		    && (!has_format_option(FO_MBYTE_JOIN2)