//(Another function call that internally makes a library call.)
this->pointer->pointer->pointer->function(); //this->pointer->pointer->pointer is valid in this stack frame.
During call:
1 2 3
void Class::function(){
this->anotherFunction(); //In this stack frame, this==0xCCCCCCCC. ?
}
If I replace the first library call with an equivalent function of my own, there's no problem.
This happens only with VC++. It works fine with GCC and Valgrind doesn't find any buffer overflows.
Any thoughts?
EDIT: Never mind. It seems to have fixed itself somehow. I think I was blitting an SDL_Surface onto itself with SDL_BlitSurface() and that somehow messed up the program state. I can't reproduce, though.