diff options
Diffstat (limited to 'plugins/androhelpers/switch.c')
-rw-r--r-- | plugins/androhelpers/switch.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/androhelpers/switch.c b/plugins/androhelpers/switch.c index f93c9e9..a5a8a75 100644 --- a/plugins/androhelpers/switch.c +++ b/plugins/androhelpers/switch.c @@ -383,8 +383,9 @@ static void look_for_switch_instructions(const GDexMethod *method, GArchInstruct bool extract_switch_info(GLoadedBinary *binary, bool link) { - GArchInstruction *instrs; /* Instructions Dalvik */ GDexFormat *format; /* Format du binaire chargé */ + GArchProcessor *proc; /* Processeur de l'architecture*/ + GArchInstruction *instrs; /* Instructions Dalvik */ size_t cls_count; /* Nombre de classes trouvées */ size_t i; /* Boucle de parcours #1 */ GDexClass *class; /* Classe à analyser */ @@ -392,8 +393,9 @@ bool extract_switch_info(GLoadedBinary *binary, bool link) size_t j; /* Boucle de parcours #2 */ GDexMethod *method; /* Méthode à parcourir */ - instrs = g_loaded_binary_get_instructions(binary); format = G_DEX_FORMAT(g_loaded_binary_get_format(binary)); + proc = g_loaded_binary_get_processor(binary); + instrs = g_arch_processor_get_disassembled_instructions(proc); cls_count = g_dex_format_count_classes(format); for (i = 0; i < cls_count; i++) @@ -416,6 +418,8 @@ bool extract_switch_info(GLoadedBinary *binary, bool link) } + g_object_unref(G_OBJECT(proc)); + return true; } |