mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Fix this code to avoid decrementing an iterator past the beginning
of a std::vector. llvm-svn: 109597
This commit is contained in:
parent
5295c21189
commit
a4186ab5f0
@ -58,13 +58,10 @@ namespace PIC16CC {
|
||||
ESNames() {}
|
||||
public:
|
||||
~ESNames() {
|
||||
std::vector<char*>::iterator it = stk.end();
|
||||
it--;
|
||||
while(stk.end() != stk.begin())
|
||||
while (!stk.empty())
|
||||
{
|
||||
char* p = *it;
|
||||
char* p = stk.back();
|
||||
delete [] p;
|
||||
it--;
|
||||
stk.pop_back();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user