diff lwasm/pseudo.c @ 370:6b33faa21a0a

Debugging output and bugfixing pass 0
author lost@starbug
date Tue, 20 Apr 2010 21:59:58 -0600
parents d96c30e60ddf
children eacdae8a1575
line wrap: on
line diff
--- a/lwasm/pseudo.c	Thu Apr 15 22:26:49 2010 -0600
+++ b/lwasm/pseudo.c	Tue Apr 20 21:59:58 2010 -0600
@@ -35,6 +35,7 @@
 	lw_expr_t addr;
 	
 	as -> endseen = 1;
+	l -> len = 0;
 	
 	if (as -> output_format != OUTPUT_DECB)
 	{
@@ -42,7 +43,14 @@
 		return;
 	}
 	
-	addr = lwasm_parse_expr(as, p);
+	if (!**p)
+	{
+		addr = lw_expr_build(lw_expr_type_int, 0);
+	}
+	else
+	{
+		addr = lwasm_parse_expr(as, p);
+	}
 	if (!addr)
 	{
 		lwasm_register_error(as, l, "Bad expression");