Skip to content

Commit 5c4f380

Browse files
committed
Merge branch 'rs/pcre-invalid-utf8-fix-fix'
Workaround we have for versions of PCRE2 before their version 10.36 were in effect only for their versions newer than 10.36 by mistake, which has been corrected. * rs/pcre-invalid-utf8-fix-fix: grep: fix triggering PCRE2_NO_START_OPTIMIZE workaround
2 parents 80f7f61 + 97169fc commit 5c4f380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
295295
if (!opt->ignore_locale && is_utf8_locale() && !literal)
296296
options |= (PCRE2_UTF | PCRE2_MATCH_INVALID_UTF);
297297

298-
#ifdef GIT_PCRE2_VERSION_10_36_OR_HIGHER
298+
#ifndef GIT_PCRE2_VERSION_10_36_OR_HIGHER
299299
/* Work around https://bugs.exim.org/show_bug.cgi?id=2642 fixed in 10.36 */
300300
if (PCRE2_MATCH_INVALID_UTF && options & (PCRE2_UTF | PCRE2_CASELESS))
301301
options |= PCRE2_NO_START_OPTIMIZE;

0 commit comments

Comments
 (0)