shithub: scc

Download patch

ref: 10a0b46b7b6016099d6aa422e09c2179fe7b2fcc
parent: 4603a2a279d2bfd1323488d4cb467d6287fed735
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat May 9 13:56:48 EDT 2015

Remove inifinite loop in ahead()

--- a/cc1/lex.c
+++ b/cc1/lex.c
@@ -518,10 +518,10 @@
 	int c;
 
 repeat:
-	if (!input)
+	if (!fill())
 		return EOFTOK;
 	while (isspace(c = *input->begin))
-		;
+		++input->begin;
 	if (c == '\0') {
 		fill();
 		goto repeat;