summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-08-13 15:53:41 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-08-13 15:53:41 (GMT)
commita7d77562cd63f6cf0856b4cc19e245072af86f69 (patch)
tree99b83fd717765386d8efafb3a9d3b82726323600 /src/analysis
parente5314b83cf2521f4a1fee5d3cbb5011d7ac7bff7 (diff)
Fixed a bug: stop on return when searching for loops.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@355 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/disass/loop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/analysis/disass/loop.c b/src/analysis/disass/loop.c
index dc68253..6835eae 100644
--- a/src/analysis/disass/loop.c
+++ b/src/analysis/disass/loop.c
@@ -213,6 +213,9 @@ static void track_loops_in_code(GArchInstruction *list, vmpa_t start, vmpa_t end
iter != NULL && !exit_track;
iter = g_arch_instruction_get_next_iter(list, iter, end))
{
+ if (g_arch_instruction_is_return(iter))
+ break;
+
dcount = g_arch_instruction_get_destinations(iter, &dests, &types, NULL);
if (dcount == 0) continue;