summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/disass/fetch.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/analysis/disass/fetch.c b/src/analysis/disass/fetch.c
index 162e4f8..17eea6a 100644
--- a/src/analysis/disass/fetch.c
+++ b/src/analysis/disass/fetch.c
@@ -102,14 +102,14 @@ GArchInstruction *disassemble_binary_parts(const GLoadedBinary *binary, GBinPart
#endif
start = pos;
- pos = 0;
+ len += start;
while (pos < len)
{
- addr = base + pos;
+ addr = base + (pos - start);
- instr = g_arch_processor_decode_instruction(proc, context, &bin_data[start],
- &pos, len, start, addr, format);
+ instr = g_arch_processor_decode_instruction(proc, context, bin_data,
+ &pos, len, addr, format);
g_arch_instruction_add_to_list(&result, instr);
#ifdef DEBUG
@@ -120,7 +120,7 @@ GArchInstruction *disassemble_binary_parts(const GLoadedBinary *binary, GBinPart
#endif
if (pos < len)
- gtk_extended_status_bar_update_activity(statusbar, id, (done + pos) * 1.0 / sum);
+ gtk_extended_status_bar_update_activity(statusbar, id, (done + pos - start) * 1.0 / sum);
}
@@ -131,7 +131,7 @@ GArchInstruction *disassemble_binary_parts(const GLoadedBinary *binary, GBinPart
g_binary_part_set_checkup(parts[i], valid, db);
#endif
- done += len;
+ done += (len - start);
gtk_extended_status_bar_update_activity(statusbar, id, done * 1.0 / sum);
}