From 845fded2a08a62fa2afd8a041d168c6774f113df Mon Sep 17 00:00:00 2001 From: rubidium42 Date: Sun, 13 Jun 2021 10:07:44 +0200 Subject: 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. --- src/network/core/packet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/network') diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp index 737b4624c..e106d5787 100644 --- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -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; } /* -- cgit v1.2.3-54-g00ecf