From 42e686f2af8fd7aabb3682e5bd7813e6f78af257 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 03:55:06 +0000 Subject: [PATCH] Decompile fn_22309 (CLoginMode::PollNetworkStatus) Batch #17771 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_22309 CLoginMode::PollNetworkStatus: logic confirmed by peer review Peer-reviewed-by: Yommy, alisonrag, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Mode/LoginMode.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Client/Mode/LoginMode.cpp b/Source/Client/Mode/LoginMode.cpp index 7b24df0d0..07f7043ff 100644 --- a/Source/Client/Mode/LoginMode.cpp +++ b/Source/Client/Mode/LoginMode.cpp @@ -2572,10 +2572,10 @@ void CLoginMode::PollNetworkStatus() { this->slotExtension.time1 = htonl(this->slotExtension.time1); this->slotExtension.time2 = htonl(this->slotExtension.time2); - const unsigned int dataLength = packet->length - offsetof(AcceptEnterNeoUnionPacket, characters); - this->characterCount = dataLength / sizeof(CharacterInfo); + this->characterCount = (packet->length - offsetof(AcceptEnterNeoUnionPacket, characters)) / sizeof(CharacterInfo); g_session.characterCount = this->characterCount; - const unsigned char* characters = reinterpret_cast(packet->characters) + dataLength % sizeof(CharacterInfo); + const unsigned char* characters = + reinterpret_cast(packet->characters) + (packet->length - offsetof(AcceptEnterNeoUnionPacket, characters)) % sizeof(CharacterInfo); memcpy_s(this->characters, sizeof(this->characters), characters, this->characterCount * sizeof(CharacterInfo)); this->pendingCursorType = 19; break;