Skip to content

Ghidra is a software reverse engineering (SRE) framework

Function Graph - fixed bug when routing edge upward that caused the edge to have a dongle

dragonmacher48ea271f00d6
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'