From d346c30269b12a03d650a65c658293b7d7bea686 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Mon, 23 Nov 2020 07:59:56 -0700 Subject: [PATCH] Fix DebuggerMarshalls errors while profiling Fixed check for array size before func_size: when func_size is 0 there's only 1 entry left and not 3. --- core/debugger/debugger_marshalls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/debugger/debugger_marshalls.cpp b/core/debugger/debugger_marshalls.cpp index 3f949b0ae12..03de832b5ea 100644 --- a/core/debugger/debugger_marshalls.cpp +++ b/core/debugger/debugger_marshalls.cpp @@ -171,7 +171,7 @@ bool DebuggerMarshalls::ServersProfilerFrame::deserialize(const Array &p_arr) { } servers.push_back(si); } - CHECK_SIZE(p_arr, idx + 3, "ServersProfilerFrame"); + CHECK_SIZE(p_arr, idx + 1, "ServersProfilerFrame"); int func_size = p_arr[idx]; idx += 1; CHECK_SIZE(p_arr, idx + func_size, "ServersProfilerFrame");