scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 42f47d7e5000112d0b3c2040b018fc5acd6363d3
parent 075f12ca9418f5a5e37bdf4893d865f3697c25ed
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  3 Feb 2018 23:21:08 +0100

[as] Cont all the lines of input files

Diffstat:
Mas/parser.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/as/parser.c b/as/parser.c @@ -453,10 +453,11 @@ repeat: delinput(); goto repeat; } - if ((n = getline(ip->fp, buff)) == 0) - goto repeat; + n = getline(ip->fp, buff); if (++ip->lineno == 0) die("as: file too long"); + if (n == 0) + goto repeat; if (extract(buff, n, lp) == 0) goto repeat; return 1;