Skip to content

Commit 7c27a5d

Browse files
committed
fix window wrap check when sending reliable outgoing commands
1 parent 9b06a12 commit 7c27a5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protocol.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@ enet_protocol_send_reliable_outgoing_commands (ENetHost * host, ENetPeer * peer)
14901490
! (outgoingCommand -> reliableSequenceNumber % ENET_PEER_RELIABLE_WINDOW_SIZE) &&
14911491
(channel -> reliableWindows [(reliableWindow + ENET_PEER_RELIABLE_WINDOWS - 1) % ENET_PEER_RELIABLE_WINDOWS] >= ENET_PEER_RELIABLE_WINDOW_SIZE ||
14921492
channel -> usedReliableWindows & ((((1 << ENET_PEER_FREE_RELIABLE_WINDOWS) - 1) << reliableWindow) |
1493-
(((1 << ENET_PEER_FREE_RELIABLE_WINDOWS) - 1) >> (ENET_PEER_RELIABLE_WINDOW_SIZE - reliableWindow)))))
1493+
(((1 << ENET_PEER_FREE_RELIABLE_WINDOWS) - 1) >> (ENET_PEER_RELIABLE_WINDOWS - reliableWindow)))))
14941494
windowWrap = 1;
14951495
if (windowWrap)
14961496
{

0 commit comments

Comments
 (0)