summaryrefslogtreecommitdiffstats
path: root/dimension/lexer.l
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-04 14:42:30 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-04 14:42:30 -0500
commit6db4b9c77718c0d5346301815283a6dcbe28689d (patch)
treed5b9d0345fa957dba12ac52559afd8a319319105 /dimension/lexer.l
parentca0a61249f45c77d9461071f9b122253a44b8460 (diff)
downloaddimension-6db4b9c77718c0d5346301815283a6dcbe28689d.tar.xz
Use RETURN_TOKEN() for lexing errors.
Fixes a segfault if the first token returned is an error token, and undefined behaviour otherwise.
Diffstat (limited to 'dimension/lexer.l')
-rw-r--r--dimension/lexer.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/dimension/lexer.l b/dimension/lexer.l
index 24195c0..953ef9b 100644
--- a/dimension/lexer.l
+++ b/dimension/lexer.l
@@ -267,7 +267,7 @@ unsigned long wchar;
dmnsn_diagnostic(filename, yylineno, yycolumn,
"Unrecognized character '%c' (0x%X)",
(int)*yytext, (unsigned int)*yytext);
- return DMNSN_T_LEX_ERROR;
+ RETURN_TOKEN(DMNSN_T_LEX_ERROR);
}
%%