diff lwasm/os9.c @ 144:86d097dceebc

Make os9 directives not throw spurious bad operand errors
author lost@l-w.ca
date Sat, 20 Aug 2011 09:59:45 -0600
parents 697bc543368c
children 244f1227f2b5
line wrap: on
line diff
--- a/lwasm/os9.c	Sat Aug 20 00:02:55 2011 -0600
+++ b/lwasm/os9.c	Sat Aug 20 09:59:45 2011 -0600
@@ -71,12 +71,14 @@
 	if (as -> output_format != OUTPUT_OS9)
 	{
 		lwasm_register_error(as, l,  "mod directive only valid for OS9 target");
+		skip_operand(p);
 		return;
 	}
 	
 	if (as -> inmod)
 	{
 		lwasm_register_error(as, l,  "Already in a module!");
+		skip_operand(p);
 		return;
 	}
 
@@ -168,6 +170,7 @@
 
 PARSEFUNC(pseudo_parse_emod)
 {
+	skip_operand(p);
 	if (as -> output_format != OUTPUT_OS9)
 	{
 		lwasm_register_error(as, l, "emod directive only valid for OS9 target");