Perl 5
/
perl.git
/ commitdiff
free
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
committers
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13dfc48
)
regcomp.c: Add assertion
author
Karl Williamson
<khw@cpan.org>
Sun, 2 Dec 2018 19:27:46 +0000
(12:27 -0700)
committer
Karl Williamson
<khw@cpan.org>
Sat, 8 Dec 2018 04:12:16 +0000
(21:12 -0700)
regcomp.c
patch
|
blob
|
blame
|
history
diff --git
a/regcomp.c
b/regcomp.c
index
c049fcc
..
1c7063c
100644
(file)
--- a/
regcomp.c
+++ b/
regcomp.c
@@
-3933,6
+3933,7
@@
S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan,
U32 flags, regnode *val, U32 depth)
{
/* Merge several consecutive EXACTish nodes into one. */
+
regnode *n = regnext(scan);
U32 stringok = 1;
regnode *next = scan + NODE_SZ_STR(scan);
@@
-3952,6
+3953,8
@@
S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan,
#endif
DEBUG_PEEP("join", scan, depth, 0);
+ assert(PL_regkind[OP(scan)] == EXACT);
+
/* Look through the subsequent nodes in the chain. Skip NOTHING, merge
* EXACT ones that are mergeable to the current one. */
while (n