# HG changeset patch # User lost # Date 1251707835 0 # Node ID 97630727000e5bc0926217aeb5654e13e85bd204 # Parent 3010e24bb9c59b49cf2a4b108746d465ed5482b6 fixed expression 'slots' to not store null on a pass 1 store diff -r 3010e24bb9c5 -r 97630727000e lwasm/lwasm.c --- a/lwasm/lwasm.c Mon Aug 31 08:30:13 2009 +0000 +++ b/lwasm/lwasm.c Mon Aug 31 08:37:15 2009 +0000 @@ -373,8 +373,13 @@ if ((as -> passnum == 1 && !(flag & EXPR_REEVAL)) || slot < 0) { s = lwasm_evaluate_expr(as, l, *inp, &ep, flag); +// if (!ep) +// ep = *inp; if (slot >= 0) + { l -> exprs[slot] = s; + l -> exprends[slot] = ep; + } if (!s) { register_error(as, l, 1, "Bad expression"); @@ -384,7 +389,7 @@ *inp = (char *)ep; if (slot >= 0) { - l -> exprends[slot] = (char *)ep; +// l -> exprends[slot] = (char *)ep; l -> exprvals[slot] = lwasm_expr_get_value(s); } }