Hi,

Probably loop goes out of allocated memory. MemPtrSize returns size of
memory chunk, not count of items, so if your dataType has size of 4
bytes and you allocated memory for 10 items, MemPtrSize will return 40,
not 4.

Probably best way to write your task is :

UInt16 size = sizeof (dateType);
UInt16 num = MemPtrSize (dateP);
dateType *newP = MemPtrNew (num);
MemMove(newP,dataP,num);


Regards,
Gregory


-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to