u32 iterations = 5;
u32* ecx = (u32*)malloc(sizeof(u32) * iterations);
memset(ecx, 0xBAADF00D, sizeof(u32) * iterations);
printf("%.8X\n", ecx[0]);
ecx[0] = 0xBAADF00D;
printf("%.8X\n", ecx[0]);
free(ecx);
Very simply put, why is my output the following?
0D0D0D0D
BAADF00D
ps: u32 is a simple typedef of unsigned int
edit:
- Compiling with gcc 4.3.4
- string.h is included