Commit 08523339 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

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

regexp parsing bug if unknown option is used
parents 74bbdb3d e8de6773
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment