It's not a bug (assuming that the inner loop really should use a new loop variable). The inner for loop uses a new instance of variable i. Check the output of the following small program:
Qt Code:
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(int , char**)
  5. {
  6. for (int i=0; i < 5; i++)
  7. {
  8. cout << i << " ";
  9. for(int i=0; i < 3; i++)
  10. if(i == 0)
  11. cout << i << endl;
  12. else
  13. cout << " " << i << endl;
  14. }
  15. }
To copy to clipboard, switch view to plain text mode 
But I would also prefer a new name for the inner for loop variable just for code readability.