From b4f63db04e5d686b2f88e040e9524cfc24d0a34e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Nov 2018 01:04:38 -0500 Subject: [PATCH] nfp: Correct erroneous sizeof expression within GetTagInfo() The previous expression would copy sizeof(size_t) amount of bytes (8 on a 64-bit platform) rather than the full 10 bytes comprising the uuid member. Given the source and destination types are the same, we can just use an assignment here instead. --- src/core/hle/service/nfp/nfp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index c1af878fe..1d6e7756f 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp @@ -212,7 +212,7 @@ private: IPC::ResponseBuilder rb{ctx, 2}; auto amiibo = nfp_interface.GetAmiiboBuffer(); TagInfo tag_info{}; - std::memcpy(tag_info.uuid.data(), amiibo.uuid.data(), sizeof(tag_info.uuid.size())); + tag_info.uuid = amiibo.uuid; tag_info.uuid_length = static_cast(tag_info.uuid.size()); tag_info.protocol = 1; // TODO(ogniK): Figure out actual values