summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/decomp/new.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik/decomp/new.c')
-rw-r--r--src/arch/dalvik/decomp/new.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/dalvik/decomp/new.c b/src/arch/dalvik/decomp/new.c
index 1c4c06e..65da469 100644
--- a/src/arch/dalvik/decomp/new.c
+++ b/src/arch/dalvik/decomp/new.c
@@ -47,15 +47,12 @@ GDecInstruction *dalvik_decomp_instr_new_instance(const GArchInstruction *instr,
{
GDecInstruction *result; /* Instruction à retourner */
GArchOperand *operand; /* Opérande de l'instruction */
- GDecInstruction *dest; /* Registre de destination */
uint32_t index; /* Indice dans la table */
GDexFormat *format; /* Accès aux constantes */
GOpenidaType *type; /* Type concerné par l'opérat° */
GBinRoutine *constructor; /* Constructeur reconstruit */
GDecInstruction *call; /* Appel au constructeur */
-
- operand = g_arch_instruction_get_operand(instr, 0);
- dest = g_dec_context_convert_register(ctx, operand);
+ GDecInstruction *dest; /* Registre de destination */
operand = g_arch_instruction_get_operand(instr, 1);
index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand));
@@ -65,6 +62,9 @@ GDecInstruction *dalvik_decomp_instr_new_instance(const GArchInstruction *instr,
constructor = g_binary_routine_new_constructor(type);
call = g_routine_call_new(constructor);
+ operand = g_arch_instruction_get_operand(instr, 0);
+ dest = g_dec_context_convert_register(ctx, operand, true);
+
result = g_assign_expression_new(G_DEC_EXPRESSION(dest), G_DEC_EXPRESSION(call));
return result;