diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index f72538e3dec..6edfb06e351 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -349,7 +349,7 @@ void EditorProfiler::_update_frame() { category->set_custom_color(0, _get_color_from_signature(m.categories[i].signature)); } - for (int j = m.categories[i].items.size() - 1; j >= 0; j--) { + for (int j = 0; j < m.categories[i].items.size(); j++) { const Metric::Category::Item &it = m.categories[i].items[j]; TreeItem *item = variables->create_item(category); diff --git a/servers/debugger/servers_debugger.cpp b/servers/debugger/servers_debugger.cpp index 11909096669..82a884e15f0 100644 --- a/servers/debugger/servers_debugger.cpp +++ b/servers/debugger/servers_debugger.cpp @@ -196,7 +196,7 @@ class ServersDebugger::ScriptsProfiler : public EngineProfiler { typedef ServersDebugger::ScriptFunctionInfo FunctionInfo; struct ProfileInfoSort { bool operator()(ScriptLanguage::ProfilingInfo *A, ScriptLanguage::ProfilingInfo *B) const { - return A->total_time < B->total_time; + return A->total_time > B->total_time; } }; Vector info;