Fix some overflows and unitialized variables
This commit is contained in:
parent
58ca9f17a2
commit
99d8626f4a
17 changed files with 35 additions and 8 deletions
|
|
@ -279,6 +279,7 @@ Ref<StreamPeer> PacketPeerStream::get_stream_peer() const {
|
|||
|
||||
void PacketPeerStream::set_input_buffer_max_size(int p_max_size) {
|
||||
|
||||
ERR_FAIL_COND_MSG(p_max_size < 0, "Max size of input buffer size cannot be smaller than 0.");
|
||||
//warning may lose packets
|
||||
ERR_FAIL_COND_MSG(ring_buffer.data_left(), "Buffer in use, resizing would cause loss of data.");
|
||||
ring_buffer.resize(nearest_shift(p_max_size + 4));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue