diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/disass/rank.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/analysis/disass/rank.c b/src/analysis/disass/rank.c index 3694d04..0b9068b 100644 --- a/src/analysis/disass/rank.c +++ b/src/analysis/disass/rank.c @@ -341,9 +341,9 @@ void rank_routine_block(const GBlockList *list, GBasicBlock *block) { rank = g_basic_block_get_rank(target); - if (next > rank) + if (next > rank || rank == -1) { - g_basic_block_set_rank(target, rank); + g_basic_block_set_rank(target, next); rank_routine_block(list, target); @@ -381,6 +381,7 @@ void rank_routine_blocks(GBinRoutine *routine) assert(start != NULL); + g_basic_block_set_rank(start, 0); rank_routine_block(blocks, start); |