bitfield endian fix

This commit is contained in:
GaryOderNichts 2020-12-25 16:26:12 +01:00
parent 7b16db25f9
commit c267181e2a

View File

@ -35,8 +35,14 @@ class CPool
U *m_entries; U *m_entries;
union Flags { union Flags {
struct { struct {
// bitfields are compiler and endian specific
#ifdef BIGENDIAN
uint8 free : 1;
uint8 id : 7;
#else
uint8 id : 7; uint8 id : 7;
uint8 free : 1; uint8 free : 1;
#endif
}; };
uint8 u; uint8 u;
} *m_flags; } *m_flags;