summaryrefslogtreecommitdiff
path: root/src/decomp/expr/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decomp/expr/array.c')
-rw-r--r--src/decomp/expr/array.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/decomp/expr/array.c b/src/decomp/expr/array.c
index c14374b..dc487ee 100644
--- a/src/decomp/expr/array.c
+++ b/src/decomp/expr/array.c
@@ -55,7 +55,7 @@ static void g_array_access_class_init(GArrayAccessClass *);
static void g_array_access_init(GArrayAccess *);
/* Imprime pour l'écran un version humaine d'une expression. */
-static void g_array_access_print(const GArrayAccess *, GCodeBuffer *, GBufferLine *, GLangOutput *);
+static GBufferLine *g_array_access_print(const GArrayAccess *, GCodeBuffer *, GBufferLine *, GLangOutput *);
@@ -146,16 +146,20 @@ GDecInstruction *g_array_access_new(GDecExpression *array, GDecExpression *index
* *
******************************************************************************/
-static void g_array_access_print(const GArrayAccess *expr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output)
+static GBufferLine *g_array_access_print(const GArrayAccess *expr, GCodeBuffer *buffer, GBufferLine *line, GLangOutput *output)
{
- g_dec_instruction_print(G_DEC_INSTRUCTION(expr->array),
- buffer, line, output);
+ GBufferLine *result; /* Ligne à retourner */
- g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "[", 1, RTT_RAW);
+ result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->array),
+ buffer, line, output);
- g_dec_instruction_print(G_DEC_INSTRUCTION(expr->index),
- buffer, line, output);
+ g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "[", 1, RTT_RAW);
- g_buffer_line_insert_text(line, BLC_ASSEMBLY_HEAD, "]", 1, RTT_RAW);
+ result = g_dec_instruction_print(G_DEC_INSTRUCTION(expr->index),
+ buffer, result, output);
+
+ g_buffer_line_insert_text(result, BLC_ASSEMBLY_HEAD, "]", 1, RTT_RAW);
+
+ return result;
}