Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #128109 - do not move RExC_open_parens[0] in reginsert
In d5a00e4 I merged GOSUB and GOSTART, part of which involved making RExC_open_parens[0] refer to the start of the pattern, and RExC_close_parens[0] referring to the end of the pattern. This tripped up in reginsert in a subtle way, the start of the pattern cannot and should not move in reginsert(). Unlike a paren that might be at the start of the pattern which should move when something is inserted in front of it, the start is a fixed point and should never move. This patches fixes this up, and adds an assert to check that reginsert() is not called once study_chunk() starts, as reginsert() does not adjust RExC_recurse. This was noticed by hv while debugging [perl #128085], thanks hugo!
- Loading branch information