mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35: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:
@@ -7,7 +7,6 @@
|
||||
#include "irr_v3d.h" // for irrlicht datatypes
|
||||
|
||||
#include "constants.h"
|
||||
#include "serialization.h" // for SER_FMT_VER_INVALID
|
||||
#include "network/networkpacket.h"
|
||||
#include "network/networkprotocol.h"
|
||||
#include "network/address.h"
|
||||
@@ -219,7 +218,7 @@ public:
|
||||
// Also, the client must be moved to some other container.
|
||||
session_t peer_id = PEER_ID_INEXISTENT;
|
||||
// The serialization version to use with the client
|
||||
u8 serialization_version = SER_FMT_VER_INVALID;
|
||||
u8 serialization_version;
|
||||
//
|
||||
u16 net_proto_version = 0;
|
||||
|
||||
@@ -333,7 +332,7 @@ public:
|
||||
|
||||
private:
|
||||
// Version is stored in here after INIT before INIT2
|
||||
u8 m_pending_serialization_version = SER_FMT_VER_INVALID;
|
||||
u8 m_pending_serialization_version;
|
||||
|
||||
/* current state of client */
|
||||
ClientState m_state = CS_Created;
|
||||
|
Reference in New Issue
Block a user