summaryrefslogtreecommitdiff
path: root/network_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'network_data.c')
-rw-r--r--network_data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/network_data.c b/network_data.c
index 827081a4e..ffb4bdddc 100644
--- a/network_data.c
+++ b/network_data.c
@@ -100,8 +100,8 @@ void NetworkSend_Packet(Packet *packet, NetworkClientState *cs)
packet->pos = 0;
packet->next = NULL;
- packet->buffer[0] = packet->size & 0xFF;
- packet->buffer[1] = packet->size >> 8;
+ packet->buffer[0] = GB(packet->size, 0, 8);
+ packet->buffer[1] = GB(packet->size, 8, 8);
// Locate last packet buffered for the client
p = cs->packet_queue;