]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Always print the char the lexer fails on for a token.
authorDale Weiler <killfieldengine@gmail.com>
Sat, 31 Aug 2013 20:52:46 +0000 (16:52 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 31 Aug 2013 20:52:46 +0000 (16:52 -0400)
lexer.c

diff --git a/lexer.c b/lexer.c
index 517747123be44ac82b2a0f53433b23aae4f2d86b..7642d261b89b4b3b9eae3e8fa6c4c1ec0751b96e 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -1519,6 +1519,6 @@ int lex_do(lex_file *lex)
         return (lex->tok.ttype = ch);
     }
 
-    lexerror(lex, "unknown token: `%s`", lex->tok.value);
+    lexerror(lex, "unknown token: `%c`", ch);
     return (lex->tok.ttype = TOKEN_ERROR);
 }