I have a simple class
class Info {
public:
long One[31];
long Two[79];
};
i'm reading values from a couple char arrays, when I write to Two[0], it overwrites One[31].
CurInfo->One[31] = atol(BufferOne);
chatoutf("%d",CurInfo->One[31]);
CurInfo->Two[0] = atol(BufferTwo);
chatoutf("%d",CurInfo->One[31]);
if I feed bufferone a -1, and then buffertwo a 623, I get the following output in my chat window:
-1
623
I have searched and searched, and this is just frankly blowing my mind... I'm assuming One[31] is the 4 bytes immediately before Two[0]... but I dont understand why its putting the "623" into the wrong place in memory... anyone know whats going on?
I would post all the code, but its several thousand lines