RE: Strangeness when moving data through an array.
RE: Strangeness when moving data through an array.
- Subject: RE: Strangeness when moving data through an array.
- From: Jeff Laing <email@hidden>
- Date: Wed, 1 Dec 2004 16:05:46 +1100
> Now, I take the data from "pkt" and I want to later stick it into a
> 16 bit (u_short), and would expect... short_test=258, but
> after I execute this statement...
>
> bcopy((u_short)&pkt[MSEQ], &short_test, 2);
Um, haven't you cast your source address down to a 16-bit value?
ie, the (u_short) out the front of &pkt[MSEQ} takes a 32-bit address and
loses the top 16 bits...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden