# HG changeset patch # User lost # Date 1260331166 0 # Node ID c537a3a723fc16d423e50d520433e368ec811d28 # Parent 4dc2a10997a63fa43e8a14d9e41028e2a7c3ed70 Fixed obscure comment detection bug diff -r 4dc2a10997a6 -r c537a3a723fc ChangeLog --- 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 diff -r 4dc2a10997a6 -r c537a3a723fc lwasm/parse.c --- 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++)