diff --git a/Kernel/KResult.h b/Kernel/KResult.h index b6988f13646..aaafe7d052f 100644 --- a/Kernel/KResult.h +++ b/Kernel/KResult.h @@ -172,8 +172,10 @@ public: } private: - alignas(T) char m_storage[sizeof(T)]; - KResult m_error; + union { + alignas(T) char m_storage[sizeof(T)]; + KResult m_error; + }; bool m_is_error { false }; bool m_have_storage { false }; };