mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #861 from cremno/regexp-parser-bugfix
regexp parsing bug if unknown option is used
This commit is contained in:
+1
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user