changeset 253:c537a3a723fc 2.x

Fixed obscure comment detection bug
author lost
date Wed, 09 Dec 2009 03:59:26 +0000
parents 4dc2a10997a6
children c7a41b4c89b3
files ChangeLog lwasm/parse.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Nov 28 04:46:09 2009 +0000
+++ b/ChangeLog	Wed Dec 09 03:59:26 2009 +0000
@@ -31,6 +31,9 @@
 [b] Fixed default linkscript for LWEX0 format to include the .ctors, .dtors,
     and related section [LWLINK]
 [!] Fixed problem outputting LWEX0 binaries with non-zero BSS size [LWLINK]
+[ ] Added rejection for comment not starting at start of line but which
+    looks like a symbol (single word ending in :, no space after ; or *)
+    [LWASM]
 
 Version 2.5
 
--- a/lwasm/parse.c	Sat Nov 28 04:46:09 2009 +0000
+++ b/lwasm/parse.c	Wed Dec 09 03:59:26 2009 +0000
@@ -73,6 +73,10 @@
 symbolagain:
 	if (!isspace(*p))
 	{
+		// if it starts with a comment character, it's not a symbol
+		if (*p == ';' || *p == '*')
+			return;
+
 		// we have a symbol specified here
 		// parse it out and record it for later use
 		for (p2 = p; *p2 && !isspace(*p2) && *p2 != ':'; p2++)