From: Peter Johnson Date: Mon, 25 Jun 2007 01:05:04 +0000 (-0000) Subject: Fix buglet in handling of SEG of SEG:OFF. We were deleting the term at X-Git-Tag: v0.6.2~8^2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81ef8abfe5aa9924aa0594ac99e977c98030a82f;p=yasm Fix buglet in handling of SEG of SEG:OFF. We were deleting the term at the wrong level. As we weren't changing numterms before either, this really could have no effect other than not freeing the memory immediately (it would be freed later). svn path=/trunk/yasm/; revision=1885 --- diff --git a/libyasm/expr.c b/libyasm/expr.c index e32b4776..c392cdf3 100644 --- a/libyasm/expr.c +++ b/libyasm/expr.c @@ -869,7 +869,8 @@ expr_level_tree(yasm_expr *e, int fold_const, int simplify_ident, e->op = YASM_EXPR_IDENT; e->terms[0].data.expn->op = YASM_EXPR_IDENT; /* Destroy the second (offset) term */ - expr_delete_term(&e->terms[1], 1); + e->terms[0].data.expn->numterms = 1; + expr_delete_term(&e->terms[0].data.expn->terms[1], 1); } /* do callback */