change string literals to be length terminated instead of null terminated, so null characters can be embeded
This commit is contained in:
@@ -15,6 +15,11 @@ int yywrap(void * unused_param) {
|
||||
|
||||
%%
|
||||
|
||||
"\0" {
|
||||
fprintf(stderr, "Error: Null character encountered at line %d\n", yylineno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
"." { return TOKEN_DOT; }
|
||||
"!" { return TOKEN_EXCLAMATION; }
|
||||
"," { return TOKEN_COMMA; }
|
||||
|
||||
Reference in New Issue
Block a user