@@ -6669,6 +6669,7 @@ if (use_jit)
66696669 match_data , mcontext );
66706670 if (rc != PCRE2_ERROR_JIT_BADOPTION )
66716671 {
6672+ match_data -> subject_length = length ;
66726673 if (rc >= 0 && (options & PCRE2_COPY_MATCHED_SUBJECT ) != 0 )
66736674 {
66746675 length = CU2BYTES (length + was_zero_terminated );
@@ -7603,6 +7604,7 @@ if (rc == MATCH_MATCH)
76037604 {
76047605 match_data -> rc = ((int )mb -> end_offset_top >= 2 * match_data -> oveccount )?
76057606 0 : (int )mb -> end_offset_top /2 + 1 ;
7607+ match_data -> subject_length = length ;
76067608 match_data -> startchar = start_match - subject ;
76077609 match_data -> leftchar = mb -> start_used_ptr - subject ;
76087610 match_data -> rightchar = ((mb -> last_used_ptr > mb -> end_match_ptr )?
@@ -7617,6 +7619,7 @@ if (rc == MATCH_MATCH)
76177619 match_data -> flags |= PCRE2_MD_COPIED_SUBJECT ;
76187620 }
76197621 else match_data -> subject = subject ;
7622+
76207623 return match_data -> rc ;
76217624 }
76227625
@@ -7638,6 +7641,7 @@ PCRE2_ERROR_PARTIAL. */
76387641else if (match_partial != NULL )
76397642 {
76407643 match_data -> subject = subject ;
7644+ match_data -> subject_length = length ;
76417645 match_data -> ovector [0 ] = match_partial - subject ;
76427646 match_data -> ovector [1 ] = end_subject - subject ;
76437647 match_data -> startchar = match_partial - subject ;
0 commit comments