In article <E1HEIs0-0001dO-00@xmission.xmission.com>, Richard <legalize@xmission.com> writes:
I will fix this with a #pragma packing directive for _WIN32...
This will probably also break on other architectures like MIPS where a mis-aligned double isn't just a minor performance penalty it throws an exception. The more portable way to handle it would be to let the compiler do whatever padding in the structure it thinks is good in order to satisfy the alignment constraints of the processor and then do fread() on the individual members one at a time from the file instead of doing fread() on the entire structure, but we can worry about that later. I'll add a TODO: comment in the code there so we don't have to rediscover this again later the hard way. -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download <http://www.xmission.com/~legalize/book/download/index.html> Legalize Adulthood! <http://blogs.xmission.com/legalize/>