GP-3198: Fixing a bug in FlatProgramAPI.getLastInstruction()

(Closes #5090)
This commit is contained in:
Ryan Kurtz 2023-03-15 06:37:03 -04:00
parent cbdb6955ed
commit cc6abb596d

View File

@ -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();