diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-02-04 14:42:30 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-02-04 14:42:30 -0500 |
commit | 6db4b9c77718c0d5346301815283a6dcbe28689d (patch) | |
tree | d5b9d0345fa957dba12ac52559afd8a319319105 | |
parent | ca0a61249f45c77d9461071f9b122253a44b8460 (diff) | |
download | dimension-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.
-rw-r--r-- | dimension/lexer.l | 2 |
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); } %% |