mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -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:
@@ -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] = '-';
|
||||
|
Reference in New Issue
Block a user