diff lwasm/macro.c @ 40:d96037ea0b80

Fixed line number counting being broken by macros
author lost@l-w.ca
date Sat, 02 Apr 2011 22:28:22 -0600
parents 23b01aa3ecf9
children bd8b3fbd1e28
line wrap: on
line diff
--- a/lwasm/macro.c	Sat Apr 02 02:48:36 2011 -0600
+++ b/lwasm/macro.c	Sat Apr 02 22:28:22 2011 -0600
@@ -267,7 +267,7 @@
 	{
 		char ctcbuf[100];
 		char *p;
-		snprintf(ctcbuf, 100, "\001\001SETCONTEXT %d\n", oldcontext);
+		snprintf(ctcbuf, 100, "\001\001SETCONTEXT %d\n\001\001SETLINENO %d\n", oldcontext, cl -> lineno + 1);
 		for (p = ctcbuf; *p; p++)
 			macro_add_to_buff(&linebuff, &bloc, &blen, *p);
 	}