diff options
Diffstat (limited to 'core/io/packet_peer.cpp')
-rw-r--r-- | core/io/packet_peer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp index f62ffd7183..66f8eea171 100644 --- a/core/io/packet_peer.cpp +++ b/core/io/packet_peer.cpp @@ -265,12 +265,12 @@ void PacketPeerStream::set_input_buffer_max_size(int p_max_size) { ERR_EXPLAIN("Buffer in use, resizing would cause loss of data"); ERR_FAIL_COND(ring_buffer.data_left()); ring_buffer.resize(nearest_shift(p_max_size + 4)); - input_buffer.resize(nearest_power_of_2(p_max_size + 4)); + input_buffer.resize(next_power_of_2(p_max_size + 4)); } void PacketPeerStream::set_output_buffer_max_size(int p_max_size) { - output_buffer.resize(nearest_power_of_2(p_max_size + 4)); + output_buffer.resize(next_power_of_2(p_max_size + 4)); } PacketPeerStream::PacketPeerStream() { |