]> granicus.if.org Git - yasm/commitdiff
Fix buglet in handling of SEG of SEG:OFF. We were deleting the term at
authorPeter Johnson <peter@tortall.net>
Mon, 25 Jun 2007 01:05:04 +0000 (01:05 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 25 Jun 2007 01:05:04 +0000 (01:05 -0000)
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

libyasm/expr.c

index e32b4776d6bc18d137810d84dfd375609f11a80f..c392cdf3fc02025eb51df1f0cad85b8ef0f22f9c 100644 (file)
@@ -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 */