shithub: scc

Download patch

ref: 50bfc145d470d78dfe38594a3a94123375c3a66a
parent: b65a8b5e2010123b7af1ae1e2e67ea1b0dc6c35f
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Oct 28 17:32:42 EDT 2013

Fix ahead

ahead calls to skip to avoid problems with spaces, but it didn't
check the value returned by skip, so in the end of the file it was
not returning EOFTOK, like is desired.

--- a/lex.c
+++ b/lex.c
@@ -328,7 +328,8 @@
 {
 	register char c;
 
-	skip();
+	if (!skip())
+		return EOFTOK;
 	ungetc(c = getc(yyin), yyin);
 	return c;
 }