Mercurial > hg-old > index.cgi
diff src/lwasm.c @ 84:e12edcfbebd5
Fixed problem with expression evaluation infrastructure not advancing input pointer on pass 2
author | lost |
---|---|
date | Wed, 14 Jan 2009 07:04:45 +0000 |
parents | d0ce3f5f6797 |
children | ea2cfebef5d0 |
line wrap: on
line diff
--- a/src/lwasm.c Wed Jan 14 06:33:13 2009 +0000 +++ b/src/lwasm.c Wed Jan 14 07:04:45 2009 +0000 @@ -402,17 +402,18 @@ *inp = (char *)ep; if (slot >= 0) { - l -> exprends[slot] = *inp; + l -> exprends[slot] = ep; l -> exprvals[slot] = lwasm_expr_get_value(s); } } else if (l -> exprs[slot]) { s = l -> exprs[slot]; - *inp = l -> exprends[slot]; lwasm_reevaluate_expr(as, l, s); l -> exprvals[slot] = lwasm_expr_get_value(s); } + if (as -> passnum == 2 && slot >= 0) + *inp = l -> exprends[slot]; if (s && lwasm_expr_is_constant(s)) {