From 8ef4b90016edd28332185edc4d442947b6330619 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 04:43:52 +0000 Subject: [PATCH] Decompile fn_03506 (CActorNameCardHolder::Load) Batch #13056 by Toshiro: 0 byte-identical, 1 confirmed by peer review. - fn_03506 CActorNameCardHolder::Load: logic confirmed by peer review Peer-reviewed-by: gordaoprogramas, cremane, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/ActorNameCache.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/Contents/ActorNameCache.cpp b/Source/Contents/ActorNameCache.cpp index 21da496a7..e4d893446 100644 --- a/Source/Contents/ActorNameCache.cpp +++ b/Source/Contents/ActorNameCache.cpp @@ -67,35 +67,38 @@ std::size_t CActorNameCardHolder::Load(const std::vector& input) { } this->cards.clear(); - const int count = *reinterpret_cast(input.data()); + int count; + std::memcpy(&count, input.data(), sizeof(count)); std::string text; std::size_t offset = 4; for (int index = 0; index < count; ++index) { - const std::uint32_t id = *reinterpret_cast(&input[offset]); + std::uint32_t id; + std::memcpy(&id, input.data() + offset, sizeof(id)); this->cards[id].Reset(); - int length = *reinterpret_cast(&input[offset + 4]); + int length; + std::memcpy(&length, input.data() + offset + 4, sizeof(length)); offset += 8; if (length > 0) { this->cards[id].name.assign(&input[offset], length); offset += length; } - length = *reinterpret_cast(&input[offset]); + std::memcpy(&length, input.data() + offset, sizeof(length)); offset += 4; if (length > 0) { this->cards[id].unknown_001C.assign(&input[offset], length); offset += length; } - length = *reinterpret_cast(&input[offset]); + std::memcpy(&length, input.data() + offset, sizeof(length)); offset += 4; if (length > 0) { this->cards[id].unknown_0034.assign(&input[offset], length); offset += length; } - length = *reinterpret_cast(&input[offset]); + std::memcpy(&length, input.data() + offset, sizeof(length)); offset += 4; if (length > 0) { this->cards[id].unknown_004C.assign(&input[offset], length);