Fixing recursion branches.

This commit is contained in:
Ben Vanik 2013-10-13 22:59:19 -07:00
parent b28c51271d
commit 72b54cfe2a
1 changed files with 3 additions and 1 deletions

View File

@ -513,9 +513,11 @@ int SymbolDatabase::AnalyzeFunction(FunctionSymbol* fn) {
// If we have some address try to see what it is.
if (block->outgoing_address) {
if (block->outgoing_address >= fn->start_address &&
if (block->outgoing_address > fn->start_address &&
block->outgoing_address <= fn->end_address) {
// Branch into a block in this function.
// Note that we make branches to the start address act as function
// calls, as they are almost always recursion cases.
block->outgoing_type = FunctionBlock::kTargetBlock;
block->outgoing_block = fn->GetBlock(block->outgoing_address);
if (!block->outgoing_block) {