summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-07-11 23:19:05 +0200
committerBram Moolenaar <Bram@vim.org>2016-07-11 23:19:05 +0200
commit5498a41f5a62c3877fee0185adf3bf7245a9a547 (patch)
tree07ebc0b4bafd67cac4f3991c9356446067e81453
parent4c06815c44dfeaafdad25dfcc40f60860096a900 (diff)
downloadvim-git-5498a41f5a62c3877fee0185adf3bf7245a9a547.tar.gz
patch 7.4.2028v7.4.2028
Problem: cppcheck warns for using index before limits check. Solution: Swap the expressions. (Dominique Pelle)
-rw-r--r--src/mbyte.c2
-rw-r--r--src/version.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index 7bc184ba2..f85d5ad60 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4357,7 +4357,7 @@ enc_locale(void)
else
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] == '-')
buf[i] = '-';
diff --git a/src/version.c b/src/version.c
index 93f3c03fa..6d75f76f1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2028,
+/**/
2027,
/**/
2026,