diff --git a/Ghidra/Features/Base/src/main/java/ghidra/program/flatapi/FlatProgramAPI.java b/Ghidra/Features/Base/src/main/java/ghidra/program/flatapi/FlatProgramAPI.java index 0a507be8ea..5de4539324 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/program/flatapi/FlatProgramAPI.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/program/flatapi/FlatProgramAPI.java @@ -1196,7 +1196,7 @@ public class FlatProgramAPI { * @return the last instruction in the current program */ public final Instruction getLastInstruction() { - Address address = currentProgram.getMinAddress(); + Address address = currentProgram.getMaxAddress(); InstructionIterator iterator = currentProgram.getListing().getInstructions(address, false); if (iterator.hasNext()) { return iterator.next();