Hi guys, I've got this problem that's driving me nuts:
I've got this code:
When I traced step-by-step in the debug and right after the ZeroMemory function, I see that the 4 first value in 'memory_content' is not zeroed like the rest. And then in the TEST DEBUG line, the one that got changed was the 'memory_content[4]' one not the 'memory_content[0]'. So it was like this:Code:unsigned char memory_content[112]; ZeroMemory(memory_content, sizeof(memory_content)); //TEST DEBUG memory_content[0] = 'A'; //END TEST DEBUG
Now what the hell happened here? This is so bizarre. Can anybody help me please? Thanks a lot in advance.1st line: memory_content[0] until [111] = garbage chars.
2nd line: memory_content[0] until [3] = garbage chars, [4] - [111] = 0
3rd line: memory_content[0] until [3] = 0, [4] = 'A', [5] - [111] = 0.