From: Bram Moolenaar Date: Mon, 11 Jul 2016 21:19:05 +0000 (+0200) Subject: patch 7.4.2028 X-Git-Tag: v7.4.2028 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5498a41f5a62c3877fee0185adf3bf7245a9a547;p=vim patch 7.4.2028 Problem: cppcheck warns for using index before limits check. Solution: Swap the expressions. (Dominique Pelle) --- 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 @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2028, /**/ 2027, /**/