0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

updated for version 7.3.464

Problem:    Compiler warning for sprintf.
Solution:   Put the length in a variable. (Dominique Pelle)
This commit is contained in:
Bram Moolenaar
2012-03-07 18:03:10 +01:00
parent 0faaeb826e
commit 552ac13d55

View File

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