From 48ea271f00d6dff2db67103ff8d9d4931c6e6a9e Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Wed, 18 Sep 2019 17:38:55 -0400 Subject: [PATCH] Function Graph - fixed bug when routing edge upward that caused the edge to have a dongle --- .../functiongraph/graph/layout/DecompilerNestedLayout.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ghidra/Features/FunctionGraphDecompilerExtension/src/main/java/ghidra/app/plugin/core/functiongraph/graph/layout/DecompilerNestedLayout.java b/Ghidra/Features/FunctionGraphDecompilerExtension/src/main/java/ghidra/app/plugin/core/functiongraph/graph/layout/DecompilerNestedLayout.java index af0c03078d..761c18f743 100644 --- a/Ghidra/Features/FunctionGraphDecompilerExtension/src/main/java/ghidra/app/plugin/core/functiongraph/graph/layout/DecompilerNestedLayout.java +++ b/Ghidra/Features/FunctionGraphDecompilerExtension/src/main/java/ghidra/app/plugin/core/functiongraph/graph/layout/DecompilerNestedLayout.java @@ -502,6 +502,9 @@ public class DecompilerNestedLayout extends AbstractFGLayout { // int delta = end.rowIndex - start.rowIndex; + if (delta < 0) { + delta = -delta; // going up + } int multiplier = EDGE_ENDPOINT_DISTANCE_MULTIPLIER; if (useSimpleRouting()) { multiplier = 1; // we allow edges to overlap with 'simple routing'