diff options
Diffstat (limited to 'tools/d2c/bits')
-rw-r--r-- | tools/d2c/bits/tokens.l | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/d2c/bits/tokens.l b/tools/d2c/bits/tokens.l index 4879f4f..deac2c7 100644 --- a/tools/d2c/bits/tokens.l +++ b/tools/d2c/bits/tokens.l @@ -31,9 +31,15 @@ . { char *msg; - asprintf(&msg, "Unhandled token in d2c bits block: '%s'", yytext); - YY_FATAL_ERROR(msg); - free(msg); + int ret; + ret = asprintf(&msg, "Unhandled token in d2c bits block: '%s'", yytext); + if (ret == -1) + YY_FATAL_ERROR("Unhandled token in undisclosed d2c bits block"); + else + { + YY_FATAL_ERROR(msg); + free(msg); + } } %% |