summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2012-03-07 18:03:10 +0100
committerBram Moolenaar <bram@vim.org>2012-03-07 18:03:10 +0100
commit001b5c27bc75a73a1e3501dba5da5e0a7dfa7b69 (patch)
tree5d708994c3e5e2fb11f53ff3eb9d3303fddda51a
parent2795977cb2a6aab99528dd4de9183f6114b8b8cb (diff)
downloadvim-001b5c27bc75a73a1e3501dba5da5e0a7dfa7b69.tar.gz
updated for version 7.3.464v7.3.464v7-3-464
Problem: Compiler warning for sprintf. Solution: Put the length in a variable. (Dominique Pelle)
-rw-r--r--src/version.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/version.c b/src/version.c
index 0f98e04e..b5e7a0cc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,10 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 464,
+/**/
+ 464,
+/**/
463,
/**/
462,
@@ -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());