Network/ENetPeer: Fix reliable sequence number wrap error

This commit is contained in:
Jérôme Leclercq 2018-07-09 18:06:08 +02:00
parent 6390da95d3
commit a870954762
2 changed files with 3 additions and 2 deletions

View File

@ -124,7 +124,8 @@ Nazara Engine:
- Added StackVector class
- ⚠️ Removed Vector[2|3]::Distancef method and made Distance method templated
- Added Vector2::Distance static method
- ⚠️ Fixed compilation error on MSVC with flag /permissive- on CullingList class
- ⚠️ Fixed compilation errors on MSVC with flag /permissive- on CullingList class
- Fixed bug in ENet implementation causing legit reliable packets to be dropped on sequence number overflow
Nazara Development Kit:
- Added ImageWidget (#139)

View File

@ -347,7 +347,7 @@ namespace Nz
{
IncomingCommmand& incomingCommand = *currentCommand;
if (incomingCommand.fragmentsRemaining > 0 || incomingCommand.reliableSequenceNumber != (channel.incomingReliableSequenceNumber + 1))
if (incomingCommand.fragmentsRemaining > 0 || incomingCommand.reliableSequenceNumber != Nz::UInt16(channel.incomingReliableSequenceNumber + 1))
break;
channel.incomingReliableSequenceNumber = incomingCommand.reliableSequenceNumber;