Re: memcpy strange behavior

2008-03-20 Thread Jean-Daniel Dupas
Le 20 mars 08 à 16:04, Dave Carrigan a écrit : On Mar 20, 2008, at 6:48 AM, Sherm Pendley wrote: On Thu, Mar 20, 2008 at 9:25 AM, Nick Rogers <[EMAIL PROTECTED]> wrote: Hi I'm using memcpy to copy a file's sector to my struct. But its skipping one UInt16 in between and copying the next va

Re: memcpy strange behavior

2008-03-20 Thread Dave Carrigan
On Mar 20, 2008, at 6:48 AM, Sherm Pendley wrote: On Thu, Mar 20, 2008 at 9:25 AM, Nick Rogers <[EMAIL PROTECTED]> wrote: Hi I'm using memcpy to copy a file's sector to my struct. But its skipping one UInt16 in between and copying the next value in the struct's corresponding field. I've checke

Re: memcpy strange behavior

2008-03-20 Thread Sherm Pendley
On Thu, Mar 20, 2008 at 9:25 AM, Nick Rogers <[EMAIL PROTECTED]> wrote: > Hi > I'm using memcpy to copy a file's sector to my struct. > But its skipping one UInt16 in between and copying the next value in > the struct's corresponding field. > I've checked the read sector and its correctly read. My

memcpy strange behavior

2008-03-20 Thread Nick Rogers
Hi I'm using memcpy to copy a file's sector to my struct. But its skipping one UInt16 in between and copying the next value in the struct's corresponding field. I've checked the read sector and its correctly read. My struct is also in order. Listing: memcpy(&myStruct, sector, sizeof(myStruct)