From c267181e2a1e616d0bc62d2197405abe0b65bcbb Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Fri, 25 Dec 2020 16:26:12 +0100 Subject: [PATCH] bitfield endian fix --- src/core/templates.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/templates.h b/src/core/templates.h index 4f7b8490..e074f22c 100644 --- a/src/core/templates.h +++ b/src/core/templates.h @@ -35,8 +35,14 @@ class CPool U *m_entries; union Flags { struct { + // bitfields are compiler and endian specific +#ifdef BIGENDIAN + uint8 free : 1; + uint8 id : 7; +#else uint8 id : 7; uint8 free : 1; +#endif }; uint8 u; } *m_flags;