summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorAdrian M. Enache <enache@rdslink.ro>2003-08-26 11:11:07 +0300
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-26 05:18:15 +0000
commite994fd663a4d8acc8c717fa28479d849341d1bb4 (patch)
tree5ce0bae519b646c868fa25a6fb71d9885a19e0af /toke.c
parent397cf4b72b64bab2d81c27006b39549ca667b5a8 (diff)
downloadperl-e994fd663a4d8acc8c717fa28479d849341d1bb4.tar.gz
Re: [PATCH] valgrind and /#/x
Message-ID: <20030826051107.GA1086@ratsnest.hole> p4raw-id: //depot/perl@20901
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/toke.c b/toke.c
index aa200963eb..aef667e434 100644
--- a/toke.c
+++ b/toke.c
@@ -1324,7 +1324,7 @@ S_scan_const(pTHX_ char *start)
except for the last char, which will be done separately. */
else if (*s == '(' && PL_lex_inpat && s[1] == '?') {
if (s[2] == '#') {
- while (s < send && *s != ')')
+ while (s+1 < send && *s != ')')
*d++ = NATIVE_TO_NEED(has_utf8,*s++);
}
else if (s[2] == '{' /* This should match regcomp.c */
@@ -1343,10 +1343,8 @@ S_scan_const(pTHX_ char *start)
count--;
regparse++;
}
- if (*regparse != ')') {
+ if (*regparse != ')')
regparse--; /* Leave one char for continuation. */
- yyerror("Sequence (?{...}) not terminated or not {}-balanced");
- }
while (s < regparse)
*d++ = NATIVE_TO_NEED(has_utf8,*s++);
}