Skip to content

Commit

Permalink
regcomp.c: Replace RExC_parse += 2 with RExC_parse_inc_by(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
demerphq authored and khwilliamson committed Mar 4, 2022
1 parent 6808022 commit e62a48c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions regcomp.c
Expand Up @@ -13601,7 +13601,7 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state,
* converted a name to the \N{U+...} form. This include changing a
* name that evaluates to multiple code points to \N{U+c1.c2.c3 ...} */

RExC_parse += 2; /* Skip past the 'U+' */
RExC_parse_inc_by(2); /* Skip past the 'U+' */

/* Code points are separated by dots. The '}' terminates the whole
* thing. */
Expand Down Expand Up @@ -14077,7 +14077,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
RExC_end - RExC_parse);
char * e = endbrace;

RExC_parse += 2;
RExC_parse_inc_by(2);

if (! endbrace) {
vFAIL2("Missing right brace on \\%c{}", name);
Expand Down Expand Up @@ -14220,7 +14220,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
&& UCHARAT(RExC_parse + 1) == '{'
&& UNLIKELY(! regcurly(RExC_parse + 1, RExC_end, NULL)))
{
RExC_parse += 2;
RExC_parse_inc_by(2);
vFAIL("Unescaped left brace in regex is illegal here");
}
nextchar(pRExC_state);
Expand Down Expand Up @@ -14270,7 +14270,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
/* diag_listed_as: Sequence \%s... not terminated in regex; marked by <-- HERE in m/%s/ */
vFAIL2("Sequence %.2s... not terminated", atom_parse_start);
} else {
RExC_parse += 2;
RExC_parse_inc_by(2);
if (ch == '{') {
while (isBLANK(*RExC_parse)) {
RExC_parse_inc_by(1);
Expand Down

0 comments on commit e62a48c

Please sign in to comment.