From f8f56963943b91c0ad78fa4b7728596d459c5ac0 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 21 Dec 2019 16:45:55 +0100 Subject: [PATCH] Correct size for PacketPeerStream in Debugger. We wanted 8 MiB but we were getting 16 MiB (minus 4 bytes for the separator). We are now getting 8 MiB minus 4 bytes for encoding. --- editor/script_editor_debugger.cpp | 2 +- scene/debugger/script_debugger_remote.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index f854af0c8da6..fd34d8f5d63a 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -2247,7 +2247,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) { add_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT)); ppeer = Ref(memnew(PacketPeerStream)); - ppeer->set_input_buffer_max_size(1024 * 1024 * 8); //8mb should be enough + ppeer->set_input_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be enough, minus 4 bytes for separator. editor = p_editor; editor->get_inspector()->connect("object_id_selected", this, "_scene_tree_property_select_object"); diff --git a/scene/debugger/script_debugger_remote.cpp b/scene/debugger/script_debugger_remote.cpp index c3c6a088cbb0..1b37a7dbdb86 100644 --- a/scene/debugger/script_debugger_remote.cpp +++ b/scene/debugger/script_debugger_remote.cpp @@ -1257,7 +1257,7 @@ ScriptDebuggerRemote::ScriptDebuggerRemote() : scene_tree(NULL) { packet_peer_stream->set_stream_peer(tcp_client); - packet_peer_stream->set_output_buffer_max_size(1024 * 1024 * 8); //8mb should be way more than enough + packet_peer_stream->set_output_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be way more than enough, minus 4 bytes for separator. phl.printfunc = _print_handler; phl.userdata = this;