Skip to content

Commit 3dfb2c5

Browse files
committed
Fix incorrect maximum number of chunks per packet
The maximum number of chunks per packet is limited to 255 due to the value being packed into 1 byte in the chunk header. The incorrect limit caused full packets to be packed with the number of chunks value being 0 due to the value 256 overflowing, which would result in receivers not unpacking any chunks due to the number being 0.
1 parent c56fa9e commit 3dfb2c5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/engine/shared/network.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ enum
8383
NET_PACKETFLAG_COMPRESSION=4,
8484
NET_PACKETFLAG_CONNLESS=8,
8585

86-
NET_MAX_PACKET_CHUNKS=256,
86+
NET_MAX_PACKET_CHUNKS = 0xFF,
8787

8888
// token
8989
NET_SEEDTIME = 16,

0 commit comments

Comments
 (0)