GUI: don't preview beyond obvious function endings in DisassemblyPopup
This commit is contained in:
parent
8c2d392f53
commit
9ecd535f51
|
|
@ -98,11 +98,16 @@ void DisassemblyPopup::setAddress(duint Address)
|
|||
mInstBuffer.clear();
|
||||
QList<dsint> rvaList;
|
||||
dsint nextRva = rva;
|
||||
bool hadBranch = false;
|
||||
do
|
||||
{
|
||||
dsint nextRva2;
|
||||
rvaList.append(nextRva);
|
||||
nextRva2 = parent->getNextInstructionRVA(nextRva, 1, true);
|
||||
Instruction_t instruction = parent->DisassembleAt(nextRva);
|
||||
if(!hadBranch && instruction.tokens.tokens[0].text.toLower() == "ret")
|
||||
break;
|
||||
if(instruction.branchDestination)
|
||||
hadBranch = true;
|
||||
auto nextRva2 = nextRva + instruction.length;
|
||||
if(nextRva2 == nextRva)
|
||||
break;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue