Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
I used PVS-Studio static analyzer to check this project. I would like…
… to suggest a variant of the way to fix the error, detected with the help of V534 diagnostic. Description of the diagnostic: https://www.viva64.com/en/examples/v534/ (#10414)

Incorrect variable 'i' from the outer loop is used in condition of the inner loop.
  • Loading branch information
DieselMachine84 authored and janvorli committed Mar 23, 2017
1 parent f0bafd7 commit 5bcd081
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/metainfo/mdinfo.cpp
Expand Up @@ -1418,7 +1418,7 @@ void MDInfo::DisplayFields(mdTypeDef inTypeDef, COR_FIELD_OFFSET *rFieldOffset,
if (cFieldOffset)
{
bool found = false;
for (ULONG iLayout = 0; i < cFieldOffset; ++iLayout)
for (ULONG iLayout = 0; iLayout < cFieldOffset; ++iLayout)
{
if (RidFromToken(rFieldOffset[iLayout].ridOfField) == RidFromToken(fields[i]))
{
Expand Down

0 comments on commit 5bcd081

Please sign in to comment.