Mercurial > vim
comparison src/version.c @ 3396:43259e4542c7 v7.3.464
updated for version 7.3.464
Problem: Compiler warning for sprintf.
Solution: Put the length in a variable. (Dominique Pelle)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 07 Mar 2012 18:03:10 +0100 |
parents | 8e0fe5a723ad |
children | d1096a4e96bd |
comparison
equal
deleted
inserted
replaced
3395:c326b6833204 | 3396:43259e4542c7 |
---|---|
712 NULL | 712 NULL |
713 }; | 713 }; |
714 | 714 |
715 static int included_patches[] = | 715 static int included_patches[] = |
716 { /* Add new patch number below this line */ | 716 { /* Add new patch number below this line */ |
717 /**/ | |
718 464, | |
719 /**/ | |
720 464, | |
717 /**/ | 721 /**/ |
718 463, | 722 463, |
719 /**/ | 723 /**/ |
720 462, | 724 462, |
721 /**/ | 725 /**/ |
2185 if (highest_patch()) | 2189 if (highest_patch()) |
2186 { | 2190 { |
2187 /* Check for 9.9x or 9.9xx, alpha/beta version */ | 2191 /* Check for 9.9x or 9.9xx, alpha/beta version */ |
2188 if (isalpha((int)vers[3])) | 2192 if (isalpha((int)vers[3])) |
2189 { | 2193 { |
2190 if (isalpha((int)vers[4])) | 2194 int len = (isalpha((int)vers[4])) ? 5 : 4; |
2191 sprintf((char *)vers + 5, ".%d%s", highest_patch(), | 2195 sprintf((char *)vers + len, ".%d%s", highest_patch(), |
2192 mediumVersion + 5); | 2196 mediumVersion + len); |
2193 else | |
2194 sprintf((char *)vers + 4, ".%d%s", highest_patch(), | |
2195 mediumVersion + 4); | |
2196 } | 2197 } |
2197 else | 2198 else |
2198 sprintf((char *)vers + 3, ".%d", highest_patch()); | 2199 sprintf((char *)vers + 3, ".%d", highest_patch()); |
2199 } | 2200 } |
2200 col += (int)STRLEN(vers); | 2201 col += (int)STRLEN(vers); |