From 8292ba7ad681e31beb9d9e2c30186ce433c5243c Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 30 Jan 2024 12:26:32 -0500 Subject: cmif_serialization: fix LargeData types --- src/core/hle/service/cmif_serialization.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/cmif_serialization.h b/src/core/hle/service/cmif_serialization.h index 5eabf51fe..315475e71 100644 --- a/src/core/hle/service/cmif_serialization.h +++ b/src/core/hle/service/cmif_serialization.h @@ -283,7 +283,7 @@ void ReadInArgument(bool is_domain, CallArguments& args, const u8* raw_data, HLE return ReadInArgument(is_domain, args, raw_data, ctx, temp); } else if constexpr (ArgumentTraits::Type == ArgumentType::InLargeData) { - constexpr size_t BufferSize = sizeof(ArgType); + constexpr size_t BufferSize = sizeof(typename ArgType::Type); // Clear the existing data. std::memset(&std::get(args), 0, BufferSize); @@ -324,7 +324,7 @@ void ReadInArgument(bool is_domain, CallArguments& args, const u8* raw_data, HLE return ReadInArgument(is_domain, args, raw_data, ctx, temp); } else if constexpr (ArgumentTraits::Type == ArgumentType::OutLargeData) { - constexpr size_t BufferSize = sizeof(ArgType); + constexpr size_t BufferSize = sizeof(typename ArgType::Type); // Clear the existing data. std::memset(&std::get(args).raw, 0, BufferSize); @@ -394,7 +394,7 @@ void WriteOutArgument(bool is_domain, CallArguments& args, u8* raw_data, HLERequ return WriteOutArgument(is_domain, args, raw_data, ctx, temp); } else if constexpr (ArgumentTraits::Type == ArgumentType::OutLargeData) { - constexpr size_t BufferSize = sizeof(ArgType); + constexpr size_t BufferSize = sizeof(typename ArgType::Type); ASSERT(ctx.CanWriteBuffer(OutBufferIndex)); if constexpr (ArgType::Attr & BufferAttr_HipcAutoSelect) { -- cgit v1.2.3