]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.464 v7.3.464
authorBram Moolenaar <Bram@vim.org>
Wed, 7 Mar 2012 17:03:10 +0000 (18:03 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 7 Mar 2012 17:03:10 +0000 (18:03 +0100)
Problem:    Compiler warning for sprintf.
Solution:   Put the length in a variable. (Dominique Pelle)

src/version.c

index 0f98e04e85c124a3e682e8f65210abde3d3717cb..b5e7a0ccb3a9be66b49ffeefecbacb5937722ce6 100644 (file)
@@ -714,6 +714,10 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    464,
+/**/
+    464,
 /**/
     463,
 /**/
@@ -2187,12 +2191,9 @@ do_intro_line(row, mesg, add_version, attr)
            /* Check for 9.9x or 9.9xx, alpha/beta version */
            if (isalpha((int)vers[3]))
            {
-               if (isalpha((int)vers[4]))
-                   sprintf((char *)vers + 5, ".%d%s", highest_patch(),
-                                                          mediumVersion + 5);
-               else
-                   sprintf((char *)vers + 4, ".%d%s", highest_patch(),
-                                                          mediumVersion + 4);
+               int len = (isalpha((int)vers[4])) ? 5 : 4;
+               sprintf((char *)vers + len, ".%d%s", highest_patch(),
+                                                        mediumVersion + len);
            }
            else
                sprintf((char *)vers + 3, ".%d", highest_patch());