summaryrefslogtreecommitdiff
path: root/src/decomp/expr/assign.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decomp/expr/assign.c')
-rw-r--r--src/decomp/expr/assign.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/decomp/expr/assign.c b/src/decomp/expr/assign.c
index 0843776..fd86021 100644
--- a/src/decomp/expr/assign.c
+++ b/src/decomp/expr/assign.c
@@ -55,7 +55,7 @@ static void g_assign_expression_class_init(GAssignExpressionClass *);
static void g_assign_expression_init(GAssignExpression *);
/* Imprime pour l'écran un version humaine d'une expression. */
-static void g_assign_expression_print(const GAssignExpression *, GCodeBuffer *, GBufferLine *, GLangOutput *);
+static GBufferLine *g_assign_expression_print(const GAssignExpression *, GCodeBuffer *, GBufferLine *, GLangOutput *);
@@ -146,15 +146,19 @@ GDecInstruction *g_assign_expression_new(GDecExpression *dest, GDecExpression *s
* *
******************************************************************************/
-static void g_assign_expression_print(const GAssignExpression *expr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output)
+static GBufferLine *g_assign_expression_print(const GAssignExpression *expr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output)
{
- g_dec_instruction_print(G_DEC_INSTRUCTION(expr->dest),
- buffer, line, output);
+ GBufferLine *result; /* Ligne à retourner */
- g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, " = ", 3, RTT_SIGNS);
+ result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->dest),
+ buffer, line, output);
- g_dec_instruction_print(G_DEC_INSTRUCTION(expr->src),
- buffer, line, output);
+ g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, " = ", 3, RTT_SIGNS);
+
+ result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->src),
+ buffer, result, output);
+
+ return result;
}