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'