Mercurial > hg > index.cgi
changeset 94:61c084b2c727
Fixed bug parsing %-prefix binary constants
author | lost@l-w.ca |
---|---|
date | Sat, 06 Aug 2011 10:29:12 -0600 |
parents | 5bf9edabd661 |
children | a23f732c5ce8 |
files | lwasm/lwasm.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lwasm/lwasm.c Wed Jun 22 19:28:36 2011 -0600 +++ b/lwasm/lwasm.c Sat Aug 06 10:29:12 2011 -0600 @@ -361,7 +361,6 @@ if (**p == '%') { // binary constant - int v = 0; (*p)++; if (**p == '-') @@ -378,7 +377,7 @@ val = val * 2 + (**p - '0'); (*p)++; } - return lw_expr_build(lw_expr_type_int, v * neg); + return lw_expr_build(lw_expr_type_int, val * neg); } if (**p == '$')