On Thu, Dec 20, 2012 at 11:05:48PM +0800, Dmitry Timoshkov wrote:
Huw Davies huw@codeweavers.com wrote:
typedef struct {
- WORD PosFormat;
- WORD Coverage;
- WORD ValueFormat1;
- WORD ValueFormat2;
- WORD ClassDef1;
- WORD ClassDef2;
- WORD Class1Count;
- WORD Class2Count;
- WORD Class1Record[1];
+} GPOS_PairPosFormat2;
Shouldn't this structure be 2 bytes aligned?
I don't see why. They're all WORDs.
There are 9 elements of 2 bytes in size each, 18 bytes in total, the compiler will align this structure to 4 bytes, making its size 20 bytes.
The size is irrelevant - it's variable sized anyway. We just care about the offsets of the elements.