From 72b54cfe2a0e3b7308d1a6635f47b0726d206205 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 13 Oct 2013 22:59:19 -0700 Subject: [PATCH] Fixing recursion branches. --- src/xenia/cpu/sdb/symbol_database.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenia/cpu/sdb/symbol_database.cc b/src/xenia/cpu/sdb/symbol_database.cc index 22bd85b8e..1b9ff7211 100644 --- a/src/xenia/cpu/sdb/symbol_database.cc +++ b/src/xenia/cpu/sdb/symbol_database.cc @@ -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) {