diff options
-rw-r--r-- | parse.y | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/parse.y b/parse.y index 590bd44..31d094d 100644 --- a/parse.y +++ b/parse.y @@ -438,6 +438,9 @@ yylex(void) } else if (c == quotec) { *p = '\0'; break; + } else if (c == '\0') { + yyerror("syntax error"); + return (findeol()); } if (p + 1 >= buf + sizeof(buf) - 1) { yyerror("string too long"); |