The calculation for the maximum position \n should be searched for,
strend - prog->minlen, is currently done in bytes. Change it to
chars for correctness. It probably doesn't matter at the moment, because
any overshoot in \n will still fail other constraints (which *do* calculate
the end-point correctly). But in the future that might change, and we
don't want any surprises.
*/
t = (char *)memchr(rx_origin, '\n',
- (strend - prog->minlen) - rx_origin);
+ HOP3c(strend, - prog->minlen, strpos) - rx_origin);
if (!t) {
DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log,
" Did not find /%s^%s/m...\n",