View Single Post
Posts: 8 | Thanked: 2 times | Joined on Jun 2009
#7
Like Rob1n, I suspect that it's a buffer overrun, Valgrind might help in its detection as fnordianslip suggested. There's a possibility that the bounds check in the for loop might not work the way you think (compiler dependent I believe). It might be evaulating i < surfaceRGBA -> w and then multiplying that by surfaceRGBA -> h, which you could eliminate with i < (surfaceRGBA -> w * surfaceRGBA -> h), but I'm not sure that'd cause the problem.