From 4ce45b3b37d162660f0e1ec829c4eab896fc4db4 Mon Sep 17 00:00:00 2001 From: lizzie Date: Wed, 16 Sep 2026 08:10:29 +0200 Subject: [hle] Fix crash on MK8D and SM3DW LDN (#4417) Crash is due to SIGILL due to mismatched N and span<> ctor(). Also some astray nullptr references. Signed-off-by: lizzie - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4417 Reviewed-by: MaranBr Reviewed-by: Maufeat --- src/common/uuid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/uuid.cpp') diff --git a/src/common/uuid.cpp b/src/common/uuid.cpp index 51fe0abaa5..4b992c5df8 100644 --- a/src/common/uuid.cpp +++ b/src/common/uuid.cpp @@ -208,9 +208,9 @@ UUID UUID::MakeRandomRFC4122V4() { return uuid; } -UUID UUID::MakeRFC4122V5(std::span sha1) { +UUID UUID::MakeRFC4122V5(std::span sha1) { UUID uuid{}; - std::memcpy(&uuid.uuid, sha1.data(), sizeof(UUID)); + std::memcpy(&uuid.uuid, sha1.data(), sha1.size()); uuid.uuid[8] = 0x80 | (uuid.uuid[8] & 0x3F); uuid.uuid[6] = 0x50 | (uuid.uuid[6] & 0xF); return uuid; -- cgit v1.2.3