From 6822d8c4ba43b29d198f2ddae8ee4b4141e6925c Mon Sep 17 00:00:00 2001 From: Brecht Kuppens Date: Thu, 16 Jan 2025 15:44:56 +0100 Subject: [PATCH] Do not read 8 bytes from memory when reading enum pointer into enum value --- core/variant/binder_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/variant/binder_common.h b/core/variant/binder_common.h index b6810930cca1..306d3517fada 100644 --- a/core/variant/binder_common.h +++ b/core/variant/binder_common.h @@ -93,7 +93,7 @@ struct VariantCaster { template <> \ struct PtrToArg { \ _FORCE_INLINE_ static m_enum convert(const void *p_ptr) { \ - return m_enum(*reinterpret_cast(p_ptr)); \ + return *reinterpret_cast(p_ptr); \ } \ typedef int64_t EncodeT; \ _FORCE_INLINE_ static void encode(m_enum p_val, const void *p_ptr) { \