]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Better handling of EOF - encountering EOF in parser_next will not return false yet...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 20 Aug 2012 16:15:31 +0000 (18:15 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 20 Aug 2012 16:15:31 +0000 (18:15 +0200)
parser.c

index 21a944bdf36c6c8e6d098bcf999bcaf3048a9aae..25415483715bea3b5bd6944fd26b1348dfaf9fb0 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -129,7 +129,7 @@ bool parser_next(parser_t *parser)
     /* lex_do kills the previous token */
     parser->tok = lex_do(parser->lex);
     if (parser->tok == TOKEN_EOF)
-        return false;
+        return true;
     if (parser->tok >= TOKEN_ERROR) {
         parseerror(parser, "lex error");
         return false;