Ok, been messing about with the debugger for a while, and it didn't make more sense (possibly because this is the first time i try to debug)
but it runs that same function 152 times without error.
m_ActiveSeeds contains Block* and varies in size as it should...
hmm.. wait. The Block* it calls that 153th time is not like the others...//it crashes after this
Ok... let's see when it get's there...
hmm... I can't seem to find when it get's here...
ah well, let's take it one add at a time then since they all get added at the end.
ok, the 117th time it adds a memory address that is empty...
and at 149 the pointer that crashes the program is added.
they both have a 0x29 address when everything else inside the m_ActiveSeeds have a 0x28 address.
both is added when this part is called:
ok think I located the problem, the edges have strange IDs,.
so this function:
1 2 3 4 5 6 7 8
|
void Map::setIDS(int x, int y){
for(int i = 0; i < x; i++){
for(int j = 0; j < y; j++){
m_Map[i][j].setID(i,j);
}
}
return;
}
| |
actually more then the edges...