shithub: scc

Download patch

ref: d664a1571ad77bc19c39470e6ed05d609d8072e5
parent: f804aedceaa0393ee3e8bf79dd58f6fe83a046c3
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat Feb 3 18:21:08 EST 2018

[as] Cont all the lines of input files

--- a/as/parser.c
+++ b/as/parser.c
@@ -453,10 +453,11 @@
 		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;