mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-10 21:55:11 +01:00
Correct marshalling of peers
This commit is contained in:
parent
2536022038
commit
61108c59a0
@ -704,6 +704,11 @@ bool Network::DeMarshalData(NetworkUpdate *p)
|
||||
case STOP:
|
||||
/* Nothing to do, just bytes */
|
||||
break;
|
||||
case SELECT_PEER:
|
||||
{
|
||||
NetworkUpdateSelectPeer *sp = (NetworkUpdateSelectPeer *)p->data;
|
||||
sp->server_id = ntohl(sp->server_id);
|
||||
} break;
|
||||
case LIST_PEERS:
|
||||
{
|
||||
NetworkUpdateListPeers *lp = (NetworkUpdateListPeers *)p->data;
|
||||
|
@ -66,7 +66,7 @@ class SelectPeerPacket(Packet):
|
||||
def demarshal_from_data(self, data):
|
||||
"""Create a new packet from raw data."""
|
||||
Packet.demarshal_from_data(self, data)
|
||||
self.server_id = struct.unpack("<L", data[8:12])[0]
|
||||
self.server_id = struct.unpack(">L", data[8:12])[0]
|
||||
|
||||
def get_id(self):
|
||||
return self.server_id
|
||||
|
Loading…
Reference in New Issue
Block a user