diff options
Diffstat (limited to 'dtc-lexer.l')
-rw-r--r-- | dtc-lexer.l | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dtc-lexer.l b/dtc-lexer.l index 0ee1caf..22dda7d 100644 --- a/dtc-lexer.l +++ b/dtc-lexer.l @@ -153,7 +153,10 @@ static void lexical_error(const char *fmt, ...); errno = 0; yylval.integer = strtoull(yytext, &e, 0); - assert(!(*e) || !e[strspn(e, "UL")]); + if (*e && e[strspn(e, "UL")]) { + lexical_error("Bad integer literal '%s'", + yytext); + } if (errno == ERANGE) lexical_error("Integer literal '%s' out of range", |