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).
This commit is contained in:
ragnarok-clanker 2026-11-12 03:55:06 +00:00
commit 42e686f2af

View file

@ -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<const unsigned char*>(packet->characters) + dataLength % sizeof(CharacterInfo);
const unsigned char* characters =
reinterpret_cast<const unsigned char*>(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;