Merge pull request #861 from cremno/regexp-parser-bugfix

regexp parsing bug if unknown option is used
This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-02-19 09:32:45 -08:00
+1 -2
View File
@@ -3462,9 +3462,8 @@ parse_string(parser_state *p, int term)
pushback(p, c);
if (toklen(p)) {
char msg[128];
free(s);
tokfix(p);
snprintf(msg, sizeof(msg), "unknown regexp option %s - %s",
snprintf(msg, sizeof(msg), "unknown regexp option%s - %s",
toklen(p) > 1 ? "s" : "", tok(p));
yyerror(p, msg);
}