Ok, you may be right, but I found a way that works.
insited of using:
Code:
char *buffer=(char*)malloc(pack2->size);
use:
Code:
uchar *buffer = new uchar[pack2->size];
That is a more currect C++ way of doing it then even using malloc.
then under that line change:
Code:
char *bufptr=buffer;
to:
Code:
uchar *bufptr=buffer;
Then at the end of the function change:
Over to:
Code:
safe_delete(buffer);
Anyway, that works under linux and windows, and still seems to fix the crash bug, good luck.