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

patch 7.4.2028

Problem:    cppcheck warns for using index before limits check.
Solution:   Swap the expressions. (Dominique Pelle)
This commit is contained in:
Bram Moolenaar
2016-07-11 23:19:05 +02:00
parent 4c06815c44
commit 5498a41f5a
2 changed files with 3 additions and 1 deletions

View File

@@ -4357,7 +4357,7 @@ enc_locale(void)
else else
s = p + 1; s = p + 1;
} }
for (i = 0; s[i] != NUL && i < (int)sizeof(buf) - 1; ++i) for (i = 0; i < (int)sizeof(buf) - 1 && s[i] != NUL; ++i)
{ {
if (s[i] == '_' || s[i] == '-') if (s[i] == '_' || s[i] == '-')
buf[i] = '-'; buf[i] = '-';

View File

@@ -758,6 +758,8 @@ 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 */
/**/
2028,
/**/ /**/
2027, 2027,
/**/ /**/