previously, code_blocks[].end pointed to the char *after* the
end of (?{...}); make it instead the last char, i.e. ')'.
This will make the code for the next commit slightly easier.
if (o->op_type == OP_CONST) {
sv_catsv(pat, cSVOPo_sv);
if (is_code) {
- pRExC_state->code_blocks[i].end = SvCUR(pat);
+ pRExC_state->code_blocks[i].end = SvCUR(pat)-1;
is_code = 0;
}
}
else {
sv_catsv_nomg(pat, msv);
if (code)
- pRExC_state->code_blocks[n-1].end = SvCUR(pat);
+ pRExC_state->code_blocks[n-1].end = SvCUR(pat)-1;
}
}
SvSETMAGIC(pat);
- RExC_start)
) {
/* this is a pre-compiled literal (?{}) */
- RExC_parse = RExC_start - 1 +
+ RExC_parse = RExC_start +
pRExC_state->code_blocks[pRExC_state->code_index].end;
if (SIZE_ONLY)
RExC_seen_evals++;