Fix #9361, a2051ba: [Network] Off by one in CanWriteToPacket

Previously it did not allow writing a byte to a packet that was of size limit - 1 anymore.
This commit is contained in:
rubidium42 2021-06-13 10:07:44 +02:00 committed by rubidium42
parent bf500c39c9
commit 845fded2a0
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ void Packet::PrepareToSend()
*/
bool Packet::CanWriteToPacket(size_t bytes_to_write)
{
return this->Size() + bytes_to_write < this->limit;
return this->Size() + bytes_to_write <= this->limit;
}
/*