浏览代码

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.
PouleyKetchoupp 4 年之前
父节点
当前提交
d346c30269
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/debugger/debugger_marshalls.cpp

+ 1 - 1
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");