diff --git a/src/pcre2grep.c b/src/pcre2grep.c index 6fa3b04..e98d743 100644 --- a/src/pcre2grep.c +++ b/src/pcre2grep.c @@ -2311,6 +2311,7 @@ while (ptr < endptr) startoffset -= (int)(linelength + endlinelength); t = end_of_line(ptr, endptr, &endlinelength); linelength = t - ptr - endlinelength; + length = (size_t)(endptr - ptr); } goto ONLY_MATCHING_RESTART;