mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-19 16:40:38 -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
|
* @return the last instruction in the current program
|
||||||
*/
|
*/
|
||||||
public final Instruction getLastInstruction() {
|
public final Instruction getLastInstruction() {
|
||||||
Address address = currentProgram.getMinAddress();
|
Address address = currentProgram.getMaxAddress();
|
||||||
InstructionIterator iterator = currentProgram.getListing().getInstructions(address, false);
|
InstructionIterator iterator = currentProgram.getListing().getInstructions(address, false);
|
||||||
if (iterator.hasNext()) {
|
if (iterator.hasNext()) {
|
||||||
return iterator.next();
|
return iterator.next();
|
||||||
|
|||||||
Reference in New Issue
Block a user