Skip to content

Commit 5498a41

Browse files
committed
patch 7.4.2028
Problem: cppcheck warns for using index before limits check. Solution: Swap the expressions. (Dominique Pelle)
1 parent 4c06815 commit 5498a41

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/mbyte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4357,7 +4357,7 @@ enc_locale(void)
43574357
else
43584358
s = p + 1;
43594359
}
4360-
for (i = 0; s[i] != NUL && i < (int)sizeof(buf) - 1; ++i)
4360+
for (i = 0; i < (int)sizeof(buf) - 1 && s[i] != NUL; ++i)
43614361
{
43624362
if (s[i] == '_' || s[i] == '-')
43634363
buf[i] = '-';

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,8 @@ static char *(features[]) =
758758

759759
static int included_patches[] =
760760
{ /* Add new patch number below this line */
761+
/**/
762+
2028,
761763
/**/
762764
2027,
763765
/**/

0 commit comments

Comments
 (0)