# HG changeset patch # User lost@l-w.ca # Date 1314332998 21600 # Node ID 9cf1796259b246062dc54db8cc199683b6aba3e1 # Parent f5b8559a5f35a1bf604922e27650577ae2cfd012 Fixed segfault in fcb,fdb,fqb with empty operands diff -r f5b8559a5f35 -r 9cf1796259b2 lwasm/pass1.c --- a/lwasm/pass1.c Wed Aug 24 21:16:17 2011 -0600 +++ b/lwasm/pass1.c Thu Aug 25 22:29:58 2011 -0600 @@ -339,7 +339,7 @@ cl -> dlen = cl -> len; } - if (*p1 && !isspace(*p1)) + if (*p1 && !isspace(*p1) && !(cl -> err)) { // flag bad operand error lwasm_register_error(as, cl, "Bad operand (%s)", p1); diff -r f5b8559a5f35 -r 9cf1796259b2 lwasm/pseudo.c --- a/lwasm/pseudo.c Wed Aug 24 21:16:17 2011 -0600 +++ b/lwasm/pseudo.c Thu Aug 25 22:29:58 2011 -0600 @@ -138,7 +138,7 @@ e = lwasm_parse_expr(as, p); if (!e) { - lwasm_register_error(as, l, "Bad expression (#%s)", i); + lwasm_register_error(as, l, "Bad expression (#%d)", i); break; } lwasm_save_expr(l, i++, e); @@ -208,7 +208,7 @@ e = lwasm_parse_expr(as, p); if (!e) { - lwasm_register_error(as, l, "Bad expression (#%s)", i); + lwasm_register_error(as, l, "Bad expression (#%d)", i); break; } lwasm_save_expr(l, i++, e);