]> granicus.if.org Git - vim/commitdiff
patch 7.4.1075 v7.4.1075
authorBram Moolenaar <Bram@vim.org>
Sun, 10 Jan 2016 12:54:48 +0000 (13:54 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 10 Jan 2016 12:54:48 +0000 (13:54 +0100)
Problem:    Crash when using an invalid command.
Solution:   Fix generating the error message. (Dominique Pelle)

src/ex_docmd.c
src/version.c

index ac713dc13cdc33be90500c7fa9c97f2947238627..837d135218ff8993b917f05d4a134277442d794a 100644 (file)
@@ -6916,6 +6916,7 @@ parse_addr_type_arg(value, vallen, argt, addr_type_arg)
     int                *addr_type_arg;
 {
     int            i, a, b;
+
     for (i = 0; addr_type_complete[i].expand != -1; ++i)
     {
        a = (int)STRLEN(addr_type_complete[i].name) == vallen;
@@ -6930,7 +6931,9 @@ parse_addr_type_arg(value, vallen, argt, addr_type_arg)
     if (addr_type_complete[i].expand == -1)
     {
        char_u  *err = value;
-       for (i=0; err[i] == NUL || !vim_iswhite(err[i]); i++);
+
+       for (i = 0; err[i] != NUL && !vim_iswhite(err[i]); i++)
+           ;
        err[i] = NUL;
        EMSG2(_("E180: Invalid address type value: %s"), err);
        return FAIL;
index d1b5124a95c8d7b223ec53db7d3122c1543b25fc..0eaa1b11ef27dd260ff1d30110165121dba6dad8 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1075,
 /**/
     1074,
 /**/