From cdd4766d59b8908b1e70e8f1117ea3dadd7e6adf Mon Sep 17 00:00:00 2001 From: Pixel <> Date: Mon, 16 Apr 2001 00:01:00 +0000 Subject: Assembler bug fix --- lib/assembler.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/assembler.c b/lib/assembler.c index c3bc4a0..79fcbce 100644 --- a/lib/assembler.c +++ b/lib/assembler.c @@ -318,7 +318,7 @@ static expression_t *copy_expression(expression_t * e) t = Emalloc(sizeof(expression_t)); *t = *e; - + if (t->symbol) { trouve = 0; if (e->e_subtype == E_LABEL) { @@ -989,6 +989,7 @@ static void evaluate(expression_t * e) t = (expression_t *) Emalloc(sizeof(expression_t)); t->e_type = t->e_subtype = E_VALUE; t->avalue = 0; + t->symbol = NULL; t->pattern = NULL; t->next = t->child = NULL; t->prev = e->child; @@ -1670,6 +1671,7 @@ void asm_eol(void) t->avalue = e_current->index; t->child = t->next = NULL; t->pattern = NULL; + t->symbol = NULL; fprintf(stderr, "Insertion de la variable %s, de valeur %i.\n", instr->names[i], t->avalue); InsererVarDansTab(&it, CreerElement(instr->names[i], t)); @@ -1697,6 +1699,7 @@ void asm_eol(void) t->avalue = 0; t->child = t->next = NULL; t->pattern = NULL; + t->symbol = NULL; fprintf(stderr, "Insertion de la variable %s, de valeur %i.\n", instr->istrings[i], t->avalue); } @@ -1711,6 +1714,7 @@ void asm_eol(void) t->avalue = evaluate_field(it, instr->istrings[i], fields);; t->child = t->next = NULL; t->pattern = NULL; + t->symbol = NULL; InsererVarDansTab(&it, CreerElement(instr->implicits[i], t)); break; case 2: /* type valeur */ @@ -1719,6 +1723,7 @@ void asm_eol(void) t->avalue = instr->ivalues[i]; t->child = t->next = NULL; t->pattern = NULL; + t->symbol = NULL; InsererVarDansTab(&it, CreerElement(instr->implicits[i], t)); break; } -- cgit v1.2.3