Avoid using invalid addresses in ListsTestCase too
This is similar to the previous commit, but done in a slightly different way to avoid changing too much of the existing code: just make "i" an alias for the first array element to ensure that "&i + 4" is a valid pointer.
This commit is contained in:
parent
6efb8e810b
commit
f27acce6cd
1 changed files with 2 additions and 1 deletions
|
|
@ -114,7 +114,8 @@ void ListsTestCase::wxStdListTest()
|
|||
wxListInt list1;
|
||||
wxListInt::iterator it, en;
|
||||
wxListInt::reverse_iterator rit, ren;
|
||||
int i;
|
||||
int buf[4];
|
||||
int& i = buf[0];
|
||||
for ( i = 0; i < 5; ++i )
|
||||
list1.push_back(i + &i);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue