mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Network: Fix serialization version checks (#15477)
This fixes some incorrect assumptions that the read and write version ranges are identical - whereas they're in fact not.
This commit is contained in:
@@ -63,7 +63,7 @@ void Client::handleCommand_Hello(NetworkPacket* pkt)
|
||||
if (pkt->getSize() < 1)
|
||||
return;
|
||||
|
||||
u8 serialization_ver;
|
||||
u8 serialization_ver; // negotiated value
|
||||
u16 proto_ver;
|
||||
u16 unused_compression_mode;
|
||||
u32 auth_mechs;
|
||||
@@ -80,9 +80,9 @@ void Client::handleCommand_Hello(NetworkPacket* pkt)
|
||||
<< ", proto_ver=" << proto_ver
|
||||
<< ". Doing auth with mech " << chosen_auth_mechanism << std::endl;
|
||||
|
||||
if (!ser_ver_supported(serialization_ver)) {
|
||||
if (!ser_ver_supported_read(serialization_ver)) {
|
||||
infostream << "Client: TOCLIENT_HELLO: Server sent "
|
||||
<< "unsupported ser_fmt_ver"<< std::endl;
|
||||
<< "unsupported ser_fmt_ver=" << (int)serialization_ver << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user