Merge pull request #95317 from esainane/when-i-am-64

binder_common: Fix uninitialized marshalling for `PtrToArg<char32_t>`
This commit is contained in:
Rémi Verschelde 2024-08-28 17:15:05 +02:00
commit 622393c115
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
};