Skip to content

Commit

Permalink
Merge pull request #95317 from esainane/when-i-am-64
Browse files Browse the repository at this point in the history
binder_common: Fix uninitialized marshalling for `PtrToArg<char32_t>`
  • Loading branch information
akien-mga committed Aug 28, 2024
2 parents 3bc84c2 + e6a7c63 commit 622393c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/variant/binder_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ struct VariantCaster<char32_t> {
template <>
struct PtrToArg<char32_t> {
_FORCE_INLINE_ static char32_t convert(const void *p_ptr) {
return char32_t(*reinterpret_cast<const int *>(p_ptr));
return char32_t(*reinterpret_cast<const int64_t *>(p_ptr));
}
typedef int64_t EncodeT;
_FORCE_INLINE_ static void encode(char32_t p_val, const void *p_ptr) {
*(int *)p_ptr = p_val;
*(int64_t *)p_ptr = p_val;
}
};

Expand Down

0 comments on commit 622393c

Please sign in to comment.