summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-01-07 07:41:47 -0700
committerKarl Williamson <khw@cpan.org>2021-01-20 06:51:49 -0700
commita25b770c008a6e530595a4b555443e2b65289a65 (patch)
tree498eaaefdb5cde9e456224eee4fe76d17269c5c9 /regcomp.c
parente513125ac7bdea1f40ab055ab8c72da44de8f869 (diff)
downloadperl-a25b770c008a6e530595a4b555443e2b65289a65.tar.gz
Point to error in malformed /x{y,z}/
Prior to this comment a curly quantifier that had an error in the bounds pointed to the left brace. Now the error message points to the first bound that has a problem.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index 8e5305cf79..72c0de9667 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -12668,7 +12668,7 @@ S_get_quantifier_value(pTHX_ RExC_state_t *pRExC_state,
}
else if (*start == '0') { /* grok_atoUV() fails for only two reasons:
leading zeros or overflow */
- RExC_parse++;
+ RExC_parse = (char * ) end;
/* Perhaps too generic a msg for what is only failure from having
* leading zeros, but this is how it's always behaved. */
@@ -12678,7 +12678,7 @@ S_get_quantifier_value(pTHX_ RExC_state_t *pRExC_state,
/* Here, found a quantifier, but was too large; either it overflowed or was
* too big a legal number */
- RExC_parse++;
+ RExC_parse = (char * ) end;
vFAIL2("Quantifier in {,} bigger than %d", REG_INFTY - 1);
NOT_REACHED; /*NOTREACHED*/