This code managed to still work because of a bug
in how ninstr() treats empty search strings.
p4raw-id: //depot/perl@26509
}
else {
/* want lines */
- if ((p = ninstr(out_ptr, out_ptr + n - 1, nl, nl))) {
+ if ((p = ninstr(out_ptr, out_ptr + n, nl, nl + 1))) {
sv_catpvn(buf_sv, out_ptr, p - out_ptr + 1);