Skip to content

Commit

Permalink
Modify mruby parser to stuff 'regexp is literal' flag into options
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Aug 14, 2022
1 parent e79649a commit aab134d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5028,7 +5028,7 @@ parse_string(parser_state *p)
int f = 0;
int re_opt;
char *s = strndup(tok(p), toklen(p));
char flags[3];
char flags[4];
char *flag = flags;
char enc = '\0';
char *encp;
Expand Down Expand Up @@ -5068,6 +5068,7 @@ parse_string(parser_state *p)
if (f & 4) *flag++ = 'm';
if (f & 16) enc = 'u';
if (f & 32) enc = 'n';
if (f & 128) *flag++ = 'l';
}
if (flag > flags) {
dup = strndup(flags, (size_t)(flag - flags));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11635,7 +11635,7 @@ parse_string(parser_state *p)
int f = 0;
int re_opt;
char *s = strndup(tok(p), toklen(p));
char flags[3];
char flags[4];
char *flag = flags;
char enc = '\0';
char *encp;
Expand Down Expand Up @@ -11675,6 +11675,7 @@ parse_string(parser_state *p)
if (f & 4) *flag++ = 'm';
if (f & 16) enc = 'u';
if (f & 32) enc = 'n';
if (f & 128) *flag++ = 'l';
}
if (flag > flags) {
dup = strndup(flags, (size_t)(flag - flags));
Expand Down

0 comments on commit aab134d

Please sign in to comment.