diff --git a/Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/graphanalysis/DataGraph.java b/Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/graphanalysis/DataGraph.java index 801c5869d4..f8764305ff 100755 --- a/Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/graphanalysis/DataGraph.java +++ b/Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/graphanalysis/DataGraph.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -325,13 +325,17 @@ public class DataGraph { private void removeInEdge(DataVertex node, int inEdge) { DataVertex inNode = node.sources.get(inEdge); int outEdge; - for (outEdge = 0; outEdge < inNode.sinks.size(); ++outEdge) { + for (outEdge = 0; outEdge < inNode.sinks.size(); outEdge++) { if (inNode.sinks.get(outEdge) == node) { break; } } node.sources.remove(inEdge); - inNode.sinks.remove(outEdge); + + int n = inNode.sinks.size(); + if (n != 0) { + inNode.sinks.remove(outEdge); + } } /** diff --git a/Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/plugin/MultiFunctionComparisonPanel.java b/Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/plugin/MultiFunctionComparisonPanel.java index b032584ca5..8d743e1677 100644 --- a/Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/plugin/MultiFunctionComparisonPanel.java +++ b/Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/plugin/MultiFunctionComparisonPanel.java @@ -29,6 +29,7 @@ import ghidra.features.base.codecompare.model.FunctionComparisonModelListener; import ghidra.features.base.codecompare.panel.CodeComparisonPanel; import ghidra.features.base.codecompare.panel.FunctionComparisonPanel; import ghidra.framework.plugintool.PluginTool; +import ghidra.program.model.address.Address; import ghidra.program.model.listing.Function; import ghidra.util.datastruct.Duo; import ghidra.util.datastruct.Duo.Side; @@ -228,7 +229,7 @@ public class MultiFunctionComparisonPanel extends FunctionComparisonPanel String functionName = f.getName(); String functionPathToProgram = f.getProgram().getDomainFile().getPathname(); - String functionAddress = f.getBody().getMinAddress().toString(); + Address functionAddress = f.getEntryPoint(); String text = functionName + "@" + functionAddress + " (" + functionPathToProgram + ")"; return super.getListCellRendererComponent(list, text, index, isSelected, cellHasFocus);