diff lwasm/pass1.c @ 410:acaafc70044b

Fixed "=" pseudo op to work correctly
author lost@l-w.ca
date Sun, 08 Aug 2010 23:47:16 -0600
parents fbb7bfed8076
children cac204676434
line wrap: on
line diff
--- a/lwasm/pass1.c	Mon Aug 02 18:07:04 2010 -0600
+++ b/lwasm/pass1.c	Sun Aug 08 23:47:16 2010 -0600
@@ -185,10 +185,10 @@
 		}
 
 		// find the end of the first token
-		for (tok = p1; *p1 && !isspace(*p1) && *p1 != ':'; p1++)
+		for (tok = p1; *p1 && !isspace(*p1) && *p1 != ':' && *p1 != '='; p1++)
 			/* do nothing */ ;
 		
-		if (*p1 == ':' || stspace == 0)
+		if (*p1 == ':' || *p1 == '=' || stspace == 0)
 		{
 			// have a symbol here
 			sym = lw_strndup(tok, p1 - tok);
@@ -197,8 +197,15 @@
 			for (; *p1 && isspace(*p1); p1++)
 				/* do nothing */ ;
 			
-			for (tok = p1; *p1 && !isspace(*p1); p1++)
-				/* do nothing */ ;
+			if (*p1 == '=')
+			{
+				tok = p1++;
+			}
+			else
+			{
+				for (tok = p1; *p1 && !isspace(*p1); p1++)
+					/* do nothing */ ;
+			}
 		}
 		if (sym)
 			cl -> sym = lw_strdup(sym);