Network/ENetPeer: Fix crash when handling fragment packets

This commit is contained in:
Jérôme Leclercq 2017-02-16 16:14:40 +01:00
parent dee5986de5
commit 7b49b3dd0e
1 changed files with 3 additions and 2 deletions

View File

@ -651,12 +651,13 @@ namespace Nz
} }
} }
if (startCommand) if (!startCommand)
{ {
ENetProtocol hostCommand = *command; ENetProtocol hostCommand = *command;
hostCommand.header.reliableSequenceNumber = startSequenceNumber; hostCommand.header.reliableSequenceNumber = startSequenceNumber;
if (!QueueIncomingCommand(hostCommand, nullptr, totalLength, ENetPacketFlag_Reliable, fragmentCount)) startCommand = QueueIncomingCommand(hostCommand, nullptr, totalLength, ENetPacketFlag_Reliable, fragmentCount);
if (!startCommand)
return false; return false;
} }