mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-10 09:13:58 -09:00
GP-3198: Fixing a bug in FlatProgramAPI.getLastInstruction()
(Closes #5090)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user