scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit de790c13ac3a3ae95e3df472b701301ae72c5adb
parent a27df969bb5356746f14a4015da02292a17e5057
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun,  1 Oct 2017 12:00:56 +0200

[as] Fix bug related to ';'

A ; finishe the current line, but the code was going further and
it tried to scan the line.

Diffstat:
as/parser.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/as/parser.c b/as/parser.c @@ -62,11 +62,12 @@ field(char **oldp) for (s = begin; ; s++) { switch (*s) { + case ';': + *s = '\0'; case '\0': *oldp = NULL; goto out_loop; case '\t': - case ';': *s = '\0'; *oldp = s+1; goto out_loop;