diff options
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/scanner.l b/src/scanner.l index 2fafa71a..72b54471 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -459,16 +459,20 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr}) {decstring} { errno = 0; yylval->val = strtoull(yytext, NULL, 0); - if (errno != 0) - BUG(); + if (errno != 0) { + yylval->string = xstrdup(yytext); + return ERROR; + } return NUM; } {hexstring} { errno = 0; yylval->val = strtoull(yytext, NULL, 0); - if (errno != 0) - BUG(); + if (errno != 0) { + yylval->string = xstrdup(yytext); + return ERROR; + } return NUM; } |