﻿# V5007\. OWASP\. Consider inspecting the loop expression\. It is possible that the 'i' variable should be incremented instead of the 'n' variable\.

The analyzer has detected a potential error in a loop: there may be a typo which causes a wrong variable to be incremented/decremented\.

For example:

```cpp
void Foo(float *Array, size_t n)
{
  for (size_t i = 0; i != n; ++n)
  { 
    ....
  }
}
```

The variable 'n' is incremented instead of the variable 'i'\. It results in an unexpected program behavior\.

This is the fixed code:

```cpp
for (size_t i = 0; i != n; ++i)
```