mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 17:33:29 +00:00
Fix this code to avoid decrementing an iterator past the beginning
of a std::vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
33591af872
commit
6d3b922670
@ -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