Skip to content

Commit af8856a

Browse files
committed
S_scan_ident: Add an assertion
That this had to be true was not obvious to me without studying closely the code before it. Adding an assertion will result in others deciding they don't have to figure it out.
1 parent ba37dad commit af8856a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

toke.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10878,6 +10878,7 @@ S_scan_ident(pTHX_ char *s, char *dest, char *dest_end, U32 flags)
1087810878
* If that copied character is a digit, it means we have something like
1087910879
* ${10}, ${1547}, etc. Handle those the same way we handle $1, etc */
1088010880
if (isDIGIT(*d)) {
10881+
assert(bracket != NO_BRACE);
1088110882
s = parse_ident(s - 1, PL_bufend, &d, e, is_utf8,
1088210883
STOP_AT_FIRST_NON_DIGIT);
1088310884

0 commit comments

Comments
 (0)