1
0
Fork 0

GUI: don't preview beyond obvious function endings in DisassemblyPopup

This commit is contained in:
mrexodia 2016-08-29 00:21:19 +02:00
parent 8c2d392f53
commit 9ecd535f51
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 7 additions and 2 deletions

View File

@ -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