Codechange: move logic whether there is enough space in a packet to write data into the Packet

This commit is contained in:
Rubidium
2021-04-18 09:26:06 +02:00
committed by rubidium42
parent c545cc9d70
commit a2051bad50
5 changed files with 37 additions and 23 deletions

View File

@@ -933,7 +933,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_FRAME(Packet *p
}
#endif
/* Receive the token. */
if (p->pos != p->size) this->token = p->Recv_uint8();
if (p->CanReadFromPacket(sizeof(uint8))) this->token = p->Recv_uint8();
DEBUG(net, 5, "Received FRAME %d", _frame_counter_server);