changeset 262:6d09310438a4 2.x

Fixed problem with local symbol context handling in the face of conditional assembly
author lost
date Thu, 07 Jan 2010 03:57:58 +0000
parents c79b3c88adbc
children
files ChangeLog lwasm/parse.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Dec 26 08:24:35 2009 +0000
+++ b/ChangeLog	Thu Jan 07 03:57:58 2010 +0000
@@ -15,6 +15,8 @@
 
 [+] Added ability to generate a list of dependencies (any file referenced
     using "include" or "includebin", including sub-includes) [LWASM]
+[b] Fixed handling of local symbol contexts in the face of conditional
+    assembly [LWASM]
 
 Version 2.6.1
 
--- a/lwasm/parse.c	Sat Dec 26 08:24:35 2009 +0000
+++ b/lwasm/parse.c	Thu Jan 07 03:57:58 2010 +0000
@@ -50,7 +50,9 @@
 	l -> inmod = as -> inmod;
 
 	// blank lines are a no brainer
-	if (!*p)
+	if (as -> passnum == 2)
+		as -> context = l -> context;
+	else if (!*p)
 	{
 		as -> context = lwasm_next_context(as);
 		return 0;
@@ -115,7 +117,7 @@
 		p++;
 	
 	// is the line blank?
-	if (!*p && !sym)
+	if (!*p && !sym && as -> passnum == 1)
 	{
 		// nothing but white space *is* a context break
 		as -> context = lwasm_next_context(as);