# HG changeset patch # User Christian Brabandt # Date 1468272607 -7200 # Node ID c086632cca2e534268592cc1c8bf009138c44340 # Parent 893b9217971045f10352d2ac1a9446bab41d98fc commit https://github.com/vim/vim/commit/5498a41f5a62c3877fee0185adf3bf7245a9a547 Author: Bram Moolenaar Date: Mon Jul 11 23:19:05 2016 +0200 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 --- 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 --- 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,