]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lex.c
generate the trailing zero
[xonotic/gmqcc.git] / lex.c
diff --git a/lex.c b/lex.c
index 4063139fed9ee61e464c1115de5c4798ea763ea8..54875a35a1314d1459157236a9cb5d416e481410 100644 (file)
--- a/lex.c
+++ b/lex.c
@@ -124,7 +124,6 @@ static int lex_trigraph(lex_file *file) {
         default:
             lex_unget('?', file);
             lex_unget(ch , file);
-            return '?';
     }
     return '?';
 }
@@ -318,7 +317,7 @@ int lex_token(lex_file *file) {
         #undef TEST_TYPE
         return LEX_IDENT;
     }
-    return ch;
+    return (ch != ' ') ? ch : lex_token(file);
 }
 
 void lex_reset(lex_file *file) {
@@ -343,7 +342,7 @@ void lex_parse(lex_file *file) {
  */
 lex_file *lex_include(lex_file *lex, const char *file) {
     lex_file *set = NULL;
-    
+
     util_strrq(file);
     if (strncmp(lex->name, file, strlen(lex->name)) == 0) {
         error(lex, ERROR_LEX, "Source file cannot include itself\n");