@@ -833,18 +833,6 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
833
833
case OP_ACCEPT :
834
834
case OP_END :
835
835
836
- /* Fail if PCRE2_ENDANCHORED is set and the end of the match is not
837
- the end of the subject. After (*ACCEPT) we fail the entire match (at this
838
- position) but backtrack if we've reached the end of the pattern. This
839
- applies whether or not we are in a recursion. */
840
-
841
- if (Feptr < mb -> end_subject &&
842
- ((mb -> moptions | mb -> poptions ) & PCRE2_ENDANCHORED ) != 0 )
843
- {
844
- if (Fop == OP_END ) RRETURN (MATCH_NOMATCH );
845
- return MATCH_NOMATCH ; /* (*ACCEPT) */
846
- }
847
-
848
836
/* Handle end of a recursion. */
849
837
850
838
if (Fcurrent_recurse != RECURSE_UNSET )
@@ -883,6 +871,18 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
883
871
Fstart_match == mb -> start_subject + mb -> start_offset )))
884
872
RRETURN (MATCH_NOMATCH );
885
873
874
+ /* Fail if PCRE2_ENDANCHORED is set and the end of the match is not
875
+ the end of the subject. After (*ACCEPT) we fail the entire match (at this
876
+ position) but backtrack if we've reached the end of the pattern. This
877
+ applies whether or not we are in a recursion. */
878
+
879
+ if (Feptr < mb -> end_subject &&
880
+ ((mb -> moptions | mb -> poptions ) & PCRE2_ENDANCHORED ) != 0 )
881
+ {
882
+ if (Fop == OP_END ) RRETURN (MATCH_NOMATCH );
883
+ return MATCH_NOMATCH ; /* (*ACCEPT) */
884
+ }
885
+
886
886
/* We have a successful match of the whole pattern. Record the result and
887
887
then do a direct return from the function. If there is space in the offset
888
888
vector, set any pairs that follow the highest-numbered captured string but
0 commit comments