Hello there,
Recently i have encouraged a bug i cannot understand. When taking sizeof my structure, i am getting a result that is 1 greater than expected. For some reason, it is calculating size of unsigned short as 3 instead of 2 (but only when calculating whole struct, sizeof(short) shows 2 as supposed to). Here i am pasing a link to the code compiled on ideaone so you can see for yoursalfe (for the beggining i thought it is my compiler).

http://ideone.com/lAYwUY

The sizeof struct is 176 when it is supposed to be 175. in the code when i try to memcpy this struct to a table of bytes i get a 0 just before the last uint16_t variable. It is not visible when checking the struct in debug mode though, everything is aligned well.

I would aprichiate any help here.