mirror of https://github.com/OpenTTD/OpenTTD
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.pull/9366/head
parent
bf500c39c9
commit
845fded2a0
|
@ -98,7 +98,7 @@ void Packet::PrepareToSend()
|
||||||
*/
|
*/
|
||||||
bool Packet::CanWriteToPacket(size_t bytes_to_write)
|
bool Packet::CanWriteToPacket(size_t bytes_to_write)
|
||||||
{
|
{
|
||||||
return this->Size() + bytes_to_write < this->limit;
|
return this->Size() + bytes_to_write <= this->limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue