Thanks for your reply. But the PATH is a struct which has something like this:
Code:
struct PATH
{
.....
int iIndex[MAX_PATH_INDEX];
};
so that's not a problem. Also this code doesn't crash AFTER the malloc() but just INSIDE it so it's kinda weird...