diff options
Diffstat (limited to 'src/decomp/expr/arithm.c')
-rw-r--r-- | src/decomp/expr/arithm.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/decomp/expr/arithm.c b/src/decomp/expr/arithm.c index 0ca73ac..d91e080 100644 --- a/src/decomp/expr/arithm.c +++ b/src/decomp/expr/arithm.c @@ -57,7 +57,7 @@ static void g_arithm_expression_class_init(GArithmExpressionClass *); static void g_arithm_expression_init(GArithmExpression *); /* Imprime pour l'écran un version humaine d'une expression. */ -static void g_arithm_expression_print(const GArithmExpression *, GCodeBuffer *, GBufferLine *, GLangOutput *); +static GBufferLine *g_arithm_expression_print(const GArithmExpression *, GCodeBuffer *, GBufferLine *, GLangOutput *); @@ -151,12 +151,13 @@ GDecInstruction *g_arithm_expression_new(GDecExpression *op1, ArithmOperationTyp * * ******************************************************************************/ -static void g_arithm_expression_print(const GArithmExpression *expr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output) +static GBufferLine *g_arithm_expression_print(const GArithmExpression *expr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output) { + GBufferLine *result; /* Ligne à retourner */ const char *sign; /* Symbole de l'opération */ - g_dec_instruction_print(G_DEC_INSTRUCTION(expr->op1), - buffer, line, output); + result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->op1), + buffer, line, output); switch (expr->type) { @@ -189,9 +190,11 @@ static void g_arithm_expression_print(const GArithmExpression *expr, GCodeBuffer break; } - g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, sign, 3, RTT_SIGNS); + g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, sign, 3, RTT_SIGNS); - g_dec_instruction_print(G_DEC_INSTRUCTION(expr->op2), - buffer, line, output); + result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->op2), + buffer, result, output); + + return result; } |