Quote Originally Posted by medievalelks View Post
Wait, are you assigning arrays allocated on the stack to the b, g, r, and a pointers in one member function and reading the pointed to data in another?
Doh, how did I miss that one?

Make them static or global, or allocate memory some way!

The reason blue goes bad is that it's the first portion of stack, you never use enough stack-space to clobber the others. If you make a sufficiently large array (16*2K bytes) on the stack in another function and filled it with zero's, you'd find that ALL of the values except a piece of blue the are zero.

--
Mats