Skip to content

Commit 574f568

Browse files
authored
Exclude PCRE2_NO_UTF_CHECK from the PCRE2_ERROR_DIFFSUBSOPTIONS check
1 parent dfd0096 commit 574f568

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pcre2_substitute.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,8 @@ if (use_existing_match)
854854
if (start_offset != match_data->start_offset)
855855
return PCRE2_ERROR_DIFFSUBSOFFSET;
856856

857-
if ((options & ~SUBSTITUTE_OPTIONS) != match_data->options)
857+
if ((options & ~(SUBSTITUTE_OPTIONS|PCRE2_NO_UTF_CHECK)) !=
858+
(match_data->options & ~PCRE2_NO_UTF_CHECK))
858859
return PCRE2_ERROR_DIFFSUBSOPTIONS;
859860
}
860861

0 commit comments

Comments
 (0)