On Sun, Mar 02, 2003 at 12:14:04AM -0800, Mark Wilden wrote:
>> "Jim Duffy" <[EMAIL PROTECTED]> wrote
>>>    profileP += Tally; // now pointing at beginning of UInt16 array.
>>>    for(i = 0; i <= ProfileLength; i++)
>>>    {
>>>         MemMove(&ProfileGlobal[i],profileP,sizeof(UInt16));
>>>         profileP += 2;
>>>    }
> 
> I think you can let the language help you out a bit more, here:
> 
>  UInt16* ra = (UInt16*) profileP;
>  for (i = 0; i < ProfileLength /* not <= */; ++i)
>         ProfileGlobal[i] = ra[i];

No, he can't.  The entire point is that  profileP  is not aligned, so
that cast is not valid.

("<" rather than "<=" is probably a good point though.)

    John

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

Reply via email to