From 493ff68365e08a1f2490d22ec5d34e0607fcd72f Mon Sep 17 00:00:00 2001 From: Paul I Date: Thu, 12 May 2022 17:55:55 +0300 Subject: [PATCH] Revert changes in functionAt (#2941) --- src/core/Cutter.cpp | 11 +---------- src/widgets/GraphWidget.cpp | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index 8759c04c..bd801a0e 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -1266,16 +1266,7 @@ RzAnalysisFunction *CutterCore::functionIn(ut64 addr) RzAnalysisFunction *CutterCore::functionAt(ut64 addr) { CORE_LOCK(); - RzAnalysisFunction *fcn = rz_analysis_get_function_at(core->analysis, addr); - if (fcn) { - return fcn; - } - RzList *list = rz_analysis_get_functions_in(core->analysis, addr); - if (rz_list_length(list) == 1) { - fcn = static_cast(rz_list_first(list)); - } - rz_list_free(list); - return fcn; + return rz_analysis_get_function_at(core->analysis, addr); } /** diff --git a/src/widgets/GraphWidget.cpp b/src/widgets/GraphWidget.cpp index f4b2b43e..beec0644 100644 --- a/src/widgets/GraphWidget.cpp +++ b/src/widgets/GraphWidget.cpp @@ -84,7 +84,7 @@ QString GraphWidget::getWidgetType() void GraphWidget::prepareHeader() { - RzAnalysisFunction *f = Core()->functionAt(seekable->getOffset()); + RzAnalysisFunction *f = Core()->functionIn(seekable->getOffset()); char *str = f ? rz_analysis_function_get_signature(f) : nullptr; if (!str) { header->hide();