From cdf3b777ca51b6631ea99f06d5f64b232bfba86d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 11:56:34 +0000 Subject: [PATCH] Decompile 2 functions in Source/Client/Replay/Replay.cpp Batch #16840 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_19320 Replay::ReadSection: logic confirmed by peer review - fn_19329 Replay::CachePacket: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Yommy, br4yan Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Replay/Replay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Client/Replay/Replay.cpp b/Source/Client/Replay/Replay.cpp index c4e7d8ca2..3088f7cae 100644 --- a/Source/Client/Replay/Replay.cpp +++ b/Source/Client/Replay/Replay.cpp @@ -469,7 +469,7 @@ std::vector Replay::ReadSection(int id) { const int index = this->FindSection(id); if (index != -1 && this->sections[index].fileOffset != 0 && this->sections[index].bytes != 0) { const ReplaySection& section = this->sections[index]; - data.resize(section.bytes); + data.resize(section.bytes, 0); std::fseek(this->file, static_cast(section.fileOffset), SEEK_SET); std::fread(data.data(), section.bytes, 1, this->file); this->Cipher(section.bytes, data.data()); @@ -1016,7 +1016,7 @@ void Replay::CachePacket(std::uint16_t id, std::uint16_t size, const unsigned ch if (!this->cachedPackets[static_cast(id)].enabled) { return; } - this->cachedPackets[static_cast(id)].bytes.resize(size, 0); + this->cachedPackets[static_cast(id)].bytes.resize(size); this->cachedPackets[static_cast(id)].bytes.assign(data, data + size); }