diff options
Diffstat (limited to 'plugins/dalvik/pseudo')
-rw-r--r-- | plugins/dalvik/pseudo/fill.c | 2 | ||||
-rw-r--r-- | plugins/dalvik/pseudo/switch.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/plugins/dalvik/pseudo/fill.c b/plugins/dalvik/pseudo/fill.c index 12382f7..cc8a412 100644 --- a/plugins/dalvik/pseudo/fill.c +++ b/plugins/dalvik/pseudo/fill.c @@ -183,7 +183,7 @@ GArchInstruction *g_dalvik_fill_instr_new(uint16_t ident, GDalvikContext *ctx, c result = g_object_new(G_TYPE_DALVIK_FILL_INSTR, NULL); - G_ARCH_INSTRUCTION(result)->uid = DPO_FILL_ARRAY_DATA; + g_arch_instruction_set_unique_id(G_ARCH_INSTRUCTION(result), DPO_FILL_ARRAY_DATA); if (!g_binary_content_read_u16(content, pos, SRE_LITTLE, &result->item_width)) goto gdfin_bad; diff --git a/plugins/dalvik/pseudo/switch.c b/plugins/dalvik/pseudo/switch.c index ea3aa90..f09fe59 100644 --- a/plugins/dalvik/pseudo/switch.c +++ b/plugins/dalvik/pseudo/switch.c @@ -193,7 +193,7 @@ GArchInstruction *g_dalvik_switch_instr_new(uint16_t ident, GDalvikContext *ctx, result = g_object_new(G_TYPE_DALVIK_SWITCH_INSTR, NULL); - G_ARCH_INSTRUCTION(result)->uid = ident; + g_arch_instruction_set_unique_id(G_ARCH_INSTRUCTION(result), ident); if (!g_binary_content_read_u16(content, pos, SRE_LITTLE, &result->switch_size)) goto gdsin_bad; @@ -237,6 +237,7 @@ GArchInstruction *g_dalvik_switch_instr_new(uint16_t ident, GDalvikContext *ctx, static bool g_dalvik_switch_decode_data(GDalvikSwitchInstr *instr, const GBinContent *content, const vmpa2t *pos) { vmpa2t iter; /* Position modifiable */ + itid_t uid; /* Identifiant unique */ int32_t first_key; /* Première clef */ uint16_t i; /* Boucle de parcours */ @@ -245,7 +246,9 @@ static bool g_dalvik_switch_decode_data(GDalvikSwitchInstr *instr, const GBinCon copy_vmpa(&iter, pos); - if (G_ARCH_INSTRUCTION(instr)->uid == DPO_PACKED_SWITCH) + uid = g_arch_instruction_get_unique_id(G_ARCH_INSTRUCTION(instr)); + + if (uid == DPO_PACKED_SWITCH) { if (!g_binary_content_read_s32(content, &iter, SRE_LITTLE, &first_key)) goto gdsdd_bad; |